@@ -511,8 +511,17 @@ private predicate callableSpecInfo(Callable c, string namespace, string type, st
511
511
}
512
512
513
513
pragma [ 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 ( )
516
525
}
517
526
518
527
private class InterpretedCallable extends Callable {
@@ -522,9 +531,9 @@ private class InterpretedCallable extends Callable {
522
531
elementSpec ( namespace , type , _, name , _, _)
523
532
)
524
533
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 )
528
537
)
529
538
}
530
539
}
0 commit comments