@@ -233,18 +233,23 @@ private module Internal {
233
233
}
234
234
235
235
pragma [ noinline]
236
- private predicate hasOverrider ( OverridableCallable oc , Gvn:: GvnType t ) {
236
+ private predicate hasOverrider ( Gvn:: GvnType t , OverridableCallable oc ) {
237
237
exists ( oc .getAnOverrider ( any ( ValueOrRefType t0 | Gvn:: getGlobalValueNumber ( t0 ) = t ) ) )
238
238
}
239
239
240
240
pragma [ noinline]
241
- private predicate hasCallable ( OverridableCallable source , Gvn:: GvnType t , OverridableCallable c ) {
241
+ private predicate hasCallable0 ( Gvn:: GvnType t , OverridableCallable c , OverridableCallable source ) {
242
242
c .getUnboundDeclaration ( ) = source and
243
243
any ( ValueOrRefType t0 | Gvn:: getGlobalValueNumber ( t0 ) = t ) .hasCallable ( c ) and
244
- hasOverrider ( c , t ) and
245
244
source = any ( DispatchMethodOrAccessorCall call ) .getAStaticTargetExt ( )
246
245
}
247
246
247
+ pragma [ noinline]
248
+ private predicate hasCallable ( Gvn:: GvnType t , OverridableCallable c , OverridableCallable source ) {
249
+ hasCallable0 ( t , c , source ) and
250
+ hasOverrider ( t , c )
251
+ }
252
+
248
253
abstract private class DispatchMethodOrAccessorCall extends DispatchCallImpl {
249
254
pragma [ noinline]
250
255
OverridableCallable getAStaticTargetExt ( ) {
@@ -260,7 +265,7 @@ private module Internal {
260
265
261
266
pragma [ noinline]
262
267
private predicate hasSubsumedQualifierType ( Gvn:: GvnType t ) {
263
- hasOverrider ( _ , t ) and
268
+ hasOverrider ( t , _ ) and
264
269
exists ( Type t0 |
265
270
t0 = getAPossibleType ( this .getQualifier ( ) , false ) and
266
271
not t0 instanceof TypeParameter
@@ -287,7 +292,7 @@ private module Internal {
287
292
pragma [ nomagic]
288
293
predicate hasSubsumedQualifierTypeOverridden ( Gvn:: GvnType t , OverridableCallable c ) {
289
294
this .hasSubsumedQualifierType ( t ) and
290
- hasCallable ( any ( OverridableCallable oc | oc = this .getAStaticTargetExt ( ) ) , t , c )
295
+ hasCallable ( t , c , any ( OverridableCallable oc | oc = this .getAStaticTargetExt ( ) ) )
291
296
}
292
297
293
298
/**
@@ -553,7 +558,7 @@ private module Internal {
553
558
554
559
pragma [ nomagic]
555
560
private predicate contextArgHasSubsumedType ( DispatchCall ctx , Gvn:: GvnType t ) {
556
- hasOverrider ( _ , t ) and
561
+ hasOverrider ( t , _ ) and
557
562
exists ( Gvn:: GvnType t0 | this .contextArgHasNonTypeParameterType ( ctx , t0 ) |
558
563
t = t0
559
564
or
0 commit comments