@@ -111,9 +111,7 @@ private module Cached {
111
111
112
112
cached
113
113
newtype TVariable =
114
- TGlobalVariable ( TGlobalScope scope , string name ) {
115
- name = any ( Generated:: GlobalVariable var ) .getValue ( )
116
- } or
114
+ TGlobalVariable ( string name ) { name = any ( Generated:: GlobalVariable var ) .getValue ( ) } or
117
115
TLocalVariable ( VariableScope scope , string name , Generated:: Identifier i ) {
118
116
scopeDefinesParameterVariable ( scope , name , i )
119
117
or
@@ -223,7 +221,7 @@ module Variable {
223
221
}
224
222
225
223
module LocalVariable {
226
- class Range extends Variable:: Range {
224
+ class Range extends Variable:: Range , TLocalVariable {
227
225
private VariableScope scope ;
228
226
private string name ;
229
227
private Generated:: Identifier i ;
@@ -239,17 +237,16 @@ module LocalVariable {
239
237
}
240
238
241
239
module GlobalVariable {
242
- class Range extends Variable:: Range {
243
- private VariableScope scope ;
240
+ class Range extends Variable:: Range , TGlobalVariable {
244
241
private string name ;
245
242
246
- Range ( ) { this = TGlobalVariable ( scope , name ) }
243
+ Range ( ) { this = TGlobalVariable ( name ) }
247
244
248
245
final override string getName ( ) { result = name }
249
246
250
247
final override Location getLocation ( ) { none ( ) }
251
248
252
- final override VariableScope getDeclaringScope ( ) { result = scope }
249
+ final override VariableScope getDeclaringScope ( ) { result = TGlobalScope ( ) }
253
250
}
254
251
}
255
252
0 commit comments