File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -151,24 +151,24 @@ class Module extends TModule {
151
151
/**
152
152
* Gets the enclosing module, as it appears in the qualified name of this module.
153
153
*
154
- * For example, the canonical enclosing module of `A::B` is `A`, and `A` itself has no canonical enclosing module.
154
+ * For example, the parent module of `A::B` is `A`, and `A` itself has no parent module.
155
155
*/
156
156
pragma [ nomagic]
157
- Module getCanonicalEnclosingModule ( ) { result .getQualifiedName ( ) = this .getEnclosingModuleName ( ) }
157
+ Module getParentModule ( ) { result .getQualifiedName ( ) = this .getEnclosingModuleName ( ) }
158
158
159
159
/**
160
160
* Gets a module named `name` declared inside this one (not aliased), provided
161
161
* that such a module is defined or reopened in the current codebase.
162
162
*
163
- * For example, for `A::B` the canonical nested module named `C` would be `A::B::C`.
163
+ * For example, for `A::B` the nested module named `C` would be `A::B::C`.
164
164
*
165
165
* Note that this is not the same as constant lookup. If `A::B::C` would resolve to a
166
166
* module whose qualified name is not `A::B::C`, then it will not be found by
167
167
* this predicate.
168
168
*/
169
169
pragma [ nomagic]
170
- Module getCanonicalNestedModule ( string name ) {
171
- result .getCanonicalEnclosingModule ( ) = this and
170
+ Module getNestedModule ( string name ) {
171
+ result .getParentModule ( ) = this and
172
172
result .getOwnModuleName ( ) = name
173
173
}
174
174
}
Original file line number Diff line number Diff line change @@ -927,7 +927,7 @@ class ModuleNode instanceof Module {
927
927
*
928
928
* For example, the canonical enclosing module of `A::B` is `A`, and `A` itself has no canonical enclosing module.
929
929
*/
930
- ModuleNode getCanonicalEnclosingModule ( ) { result = super .getCanonicalEnclosingModule ( ) }
930
+ ModuleNode getCanonicalEnclosingModule ( ) { result = super .getParentModule ( ) }
931
931
932
932
/**
933
933
* Gets a module named `name` declared inside this one (not aliased), provided
@@ -939,7 +939,7 @@ class ModuleNode instanceof Module {
939
939
* module whose qualified name is not `A::B::C`, then it will not be found by
940
940
* this predicate.
941
941
*/
942
- ModuleNode getCanonicalNestedModule ( string name ) { result = super .getCanonicalNestedModule ( name ) }
942
+ ModuleNode getCanonicalNestedModule ( string name ) { result = super .getNestedModule ( name ) }
943
943
}
944
944
945
945
/**
@@ -1152,7 +1152,7 @@ class ConstRef extends LocalSourceNode {
1152
1152
*/
1153
1153
predicate isPossiblyGlobal ( ) {
1154
1154
exists ( Module mod |
1155
- not exists ( mod .getCanonicalEnclosingModule ( ) ) and
1155
+ not exists ( mod .getParentModule ( ) ) and
1156
1156
mod .getAnImmediateReference ( ) = access
1157
1157
)
1158
1158
or
@@ -1237,7 +1237,7 @@ class ConstRef extends LocalSourceNode {
1237
1237
name = this .getName ( )
1238
1238
or
1239
1239
exists ( Module mod |
1240
- this .getExactTarget ( ) = mod .getCanonicalNestedModule ( name ) and
1240
+ this .getExactTarget ( ) = mod .getNestedModule ( name ) and
1241
1241
scope = MkExactLookup ( mod )
1242
1242
)
1243
1243
}
You can’t perform that action at this time.
0 commit comments