@@ -504,15 +504,26 @@ class UnboundCallable extends Callable {
504504 }
505505}
506506
507+ pragma [ nomagic]
508+ private predicate callableSpecInfo ( Callable c , string namespace , string type , string name ) {
509+ c .getDeclaringType ( ) .hasQualifiedName ( namespace , type ) and
510+ c .getName ( ) = name
511+ }
512+
513+ pragma [ nomagic]
514+ private predicate subtypeSpecCandidate ( Callable c , UnboundValueOrRefType t ) {
515+ elementSpec ( _, _, true , c .getName ( ) , _, _, t )
516+ }
517+
507518private class InterpretedCallable extends Callable {
508519 InterpretedCallable ( ) {
509- exists ( UnboundValueOrRefType t , boolean subtypes , string name |
510- elementSpec ( _ , _ , subtypes , name , _ , _ , t ) and
511- this . hasName ( name )
512- |
513- this . getDeclaringType ( ) = t
514- or
515- subtypes = true and
520+ exists ( string namespace , string type , string name |
521+ callableSpecInfo ( this , namespace , type , name ) and
522+ elementSpec ( namespace , type , _ , name , _ , _ )
523+ )
524+ or
525+ exists ( UnboundValueOrRefType t |
526+ subtypeSpecCandidate ( this , t ) and
516527 this .getDeclaringType ( ) = t .getASubTypeUnbound + ( )
517528 )
518529 }
0 commit comments