@@ -504,16 +504,36 @@ class UnboundCallable extends Callable {
504
504
}
505
505
}
506
506
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 ( 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 ( )
525
+ }
526
+
507
527
private class InterpretedCallable extends Callable {
508
528
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
516
- this . getDeclaringType ( ) = t . getASubTypeUnbound + ( )
529
+ exists ( string namespace , string type , string name |
530
+ callableSpecInfo ( this , namespace , type , name ) and
531
+ elementSpec ( namespace , type , _ , name , _ , _ )
532
+ )
533
+ or
534
+ exists ( string name , UnboundValueOrRefType t |
535
+ callableInfo ( this , name , t ) and
536
+ subtypeSpecCandidate ( name , t )
517
537
)
518
538
}
519
539
}
0 commit comments