@@ -511,8 +511,17 @@ private predicate callableSpecInfo(Callable c, string namespace, string type, st
511511}
512512
513513pragma [ nomagic]
514- private predicate subtypeSpecCandidate ( Callable c , UnboundValueOrRefType t ) {
515- elementSpec ( _, _, true , c .getName ( ) , _, _, t )
514+ private predicate subtypeSpecCandidate ( string name , UnboundValueOrRefType t ) {
515+ exists ( UnboundValueOrRefType t0 |
516+ elementSpec ( _, _, true , name , _, _, t0 ) and
517+ t = t0 .getASubTypeUnbound + ( )
518+ )
519+ }
520+
521+ pragma [ nomagic]
522+ private predicate callableInfo ( Callable c , string name , UnboundValueOrRefType decl ) {
523+ name = c .getName ( ) and
524+ decl = c .getDeclaringType ( )
516525}
517526
518527private class InterpretedCallable extends Callable {
@@ -522,9 +531,9 @@ private class InterpretedCallable extends Callable {
522531 elementSpec ( namespace , type , _, name , _, _)
523532 )
524533 or
525- exists ( UnboundValueOrRefType t |
526- subtypeSpecCandidate ( this , t ) and
527- this . getDeclaringType ( ) = t . getASubTypeUnbound + ( )
534+ exists ( string name , UnboundValueOrRefType t |
535+ callableInfo ( this , name , t ) and
536+ subtypeSpecCandidate ( name , t )
528537 )
529538 }
530539}
0 commit comments