@@ -118,8 +118,9 @@ class ExplicitUpcast extends ExplicitCast {
118118 }
119119
120120 pragma [ nomagic]
121- private predicate isDisambiguatingStaticCall0 ( StaticCall c , StaticCallable target , ValueOrRefType t ) {
121+ private predicate isDisambiguatingStaticCall0 ( StaticCall c , StaticCallable target , string name , ValueOrRefType t ) {
122122 this .isArgument ( c , target ) and
123+ name = target .getName ( ) and
123124 (
124125 t = c .( QualifiableExpr ) .getQualifier ( ) .getType ( )
125126 or
@@ -131,9 +132,9 @@ class ExplicitUpcast extends ExplicitCast {
131132 /** Holds if this upcast may be used to disambiguate the target of a static call. */
132133 pragma [ nomagic]
133134 private predicate isDisambiguatingStaticCall ( StaticCallable other , int args ) {
134- exists ( StaticCall c , StaticCallable target , ValueOrRefType t |
135- this .isDisambiguatingStaticCall0 ( c , target , t ) |
136- hasStaticCallable ( t , other , target . getName ( ) ) and
135+ exists ( StaticCall c , StaticCallable target , ValueOrRefType t , string name |
136+ this .isDisambiguatingStaticCall0 ( c , target , name , t ) |
137+ hasStaticCallable ( t , other , name ) and
137138 args = c .getNumberOfArguments ( ) and
138139 other != target
139140 )
0 commit comments