File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2226,7 +2226,7 @@ class ModuleExpr extends TModuleExpr, TypeRef {
22262226 or
22272227 not exists ( me .getName ( ) ) and result = me .getChild ( ) .( QL:: SimpleId ) .getValue ( )
22282228 or
2229- result = me .getChild ( ) .( QL:: ModuleInstantiation ) .getName ( ) .getChild ( ) .getValue ( )
2229+ result = me .getAFieldOrChild ( ) .( QL:: ModuleInstantiation ) .getName ( ) .getChild ( ) .getValue ( )
22302230 }
22312231
22322232 /**
@@ -2261,7 +2261,7 @@ class ModuleExpr extends TModuleExpr, TypeRef {
22612261 * The result is either a `PredicateExpr` or a `TypeExpr`.
22622262 */
22632263 SignatureExpr getArgument ( int i ) {
2264- result .toQL ( ) = me .getChild ( ) .( QL:: ModuleInstantiation ) .getChild ( i )
2264+ result .toQL ( ) = me .getAFieldOrChild ( ) .( QL:: ModuleInstantiation ) .getChild ( i )
22652265 }
22662266}
22672267
Original file line number Diff line number Diff line change @@ -332,7 +332,19 @@ module ModConsistency {
332332 * }
333333 */
334334
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+ }
336342
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+ }
338350}
You can’t perform that action at this time.
0 commit comments