@@ -1699,7 +1699,7 @@ private module AssocFunctionResolution {
16991699 exists ( AssocFunctionType selfType |
17001700 ArgIsInstantiationOfSelfParam:: argIsInstantiationOf ( this , i , selfPos , derefChain , borrow ,
17011701 selfType ) and
1702- CallArgsAreInstantiationsOf:: argsAreNotInstantiationsOf ( this , i , _ ) and
1702+ CallArgsAreInstantiationsOf:: argsAreNotInstantiationsOf ( this , i ) and
17031703 root = selfType .getTypeAt ( TypePath:: nil ( ) )
17041704 )
17051705 }
@@ -2297,7 +2297,7 @@ private module AssocFunctionResolution {
22972297 }
22982298
22992299 /** A call with a dereference chain and a potential borrow. */
2300- private class AssocFunctionCallCand extends MkAssocFunctionCallCand {
2300+ final private class AssocFunctionCallCand extends MkAssocFunctionCallCand {
23012301 AssocFunctionCall afc_ ;
23022302 FunctionPosition selfPos ;
23032303 FunctionPosition selfPosAdj ;
@@ -2394,7 +2394,7 @@ private module AssocFunctionResolution {
23942394 result = this .resolveCallTargetCand ( i ) and
23952395 not FunctionOverloading:: functionResolutionDependsOnArgument ( i , result , _, _)
23962396 or
2397- CallArgsAreInstantiationsOf:: argsAreInstantiationsOf ( afc_ , i , result )
2397+ CallArgsAreInstantiationsOf:: argsAreInstantiationsOf ( this , i , result )
23982398 }
23992399
24002400 string toString ( ) {
@@ -2621,21 +2621,25 @@ private module AssocFunctionResolution {
26212621 FunctionOverloading:: functionResolutionDependsOnArgument ( i , f , traitTp , pos )
26222622 }
26232623
2624- final private class AssocFunctionCallFinal = AssocFunctionCall ;
2625-
2626- class Call extends AssocFunctionCallFinal {
2627- Type getArgType ( FunctionPosition pos , TypePath path ) { result = this . getTypeAt ( pos , path ) }
2624+ class Call extends AssocFunctionCallCand {
2625+ Type getArgType ( FunctionPosition pos , TypePath path ) {
2626+ result = this . getAssocFunctionCall ( ) . getTypeAt ( pos , path )
2627+ }
26282628
26292629 predicate hasTargetCand ( ImplOrTraitItemNode i , Function f ) {
2630- f =
2631- any ( AssocFunctionCallCand afcc | afcc = MkAssocFunctionCallCand ( this , _, _, _, _) )
2632- .resolveCallTargetCand ( i )
2630+ f = this .resolveCallTargetCand ( i )
26332631 }
26342632 }
26352633 }
26362634
2637- private module CallArgsAreInstantiationsOf =
2638- ArgsAreInstantiationsOf< CallArgsAreInstantiationsOfInput > ;
2635+ private module CallArgsAreInstantiationsOf {
2636+ import ArgsAreInstantiationsOf< CallArgsAreInstantiationsOfInput >
2637+
2638+ pragma [ nomagic]
2639+ predicate argsAreNotInstantiationsOf ( AssocFunctionCall afc , ImplOrTraitItemNode i ) {
2640+ argsAreNotInstantiationsOf ( MkAssocFunctionCallCand ( afc , _, _, _, _) , i , _)
2641+ }
2642+ }
26392643}
26402644
26412645/**
0 commit comments