File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -2226,7 +2226,7 @@ class ModuleExpr extends TModuleExpr, TypeRef {
2226
2226
or
2227
2227
not exists ( me .getName ( ) ) and result = me .getChild ( ) .( QL:: SimpleId ) .getValue ( )
2228
2228
or
2229
- result = me .getChild ( ) .( QL:: ModuleInstantiation ) .getName ( ) .getChild ( ) .getValue ( )
2229
+ result = me .getAFieldOrChild ( ) .( QL:: ModuleInstantiation ) .getName ( ) .getChild ( ) .getValue ( )
2230
2230
}
2231
2231
2232
2232
/**
@@ -2261,7 +2261,7 @@ class ModuleExpr extends TModuleExpr, TypeRef {
2261
2261
* The result is either a `PredicateExpr` or a `TypeExpr`.
2262
2262
*/
2263
2263
SignatureExpr getArgument ( int i ) {
2264
- result .toQL ( ) = me .getChild ( ) .( QL:: ModuleInstantiation ) .getChild ( i )
2264
+ result .toQL ( ) = me .getAFieldOrChild ( ) .( QL:: ModuleInstantiation ) .getChild ( i )
2265
2265
}
2266
2266
}
2267
2267
Original file line number Diff line number Diff line change @@ -332,7 +332,19 @@ module ModConsistency {
332
332
* }
333
333
*/
334
334
335
- query predicate noName ( Module mod ) { not exists ( mod .getName ( ) ) }
335
+ query predicate noName ( AstNode mod ) {
336
+ mod instanceof Module and
337
+ not exists ( mod .( Module ) .getName ( ) )
338
+ or
339
+ mod instanceof ModuleExpr and
340
+ not exists ( mod .( ModuleExpr ) .getName ( ) )
341
+ }
336
342
337
- query predicate nonUniqueName ( Module mod ) { count ( mod .getName ( ) ) >= 2 }
343
+ query predicate nonUniqueName ( AstNode mod ) {
344
+ mod instanceof Module and
345
+ count ( mod .( Module ) .getName ( ) ) >= 2
346
+ or
347
+ mod instanceof ModuleExpr and
348
+ count ( mod .( ModuleExpr ) .getName ( ) ) >= 2
349
+ }
338
350
}
You can’t perform that action at this time.
0 commit comments