@@ -675,12 +675,13 @@ private module CallExprBaseMatchingInput implements MatchingInputSig {
675675 apos = dpos
676676 }
677677
678- bindingset [ apos, target, path, t]
678+ bindingset [ a , apos, target, path, t]
679679 pragma [ inline_late]
680680 predicate adjustAccessType (
681- AccessPosition apos , Declaration target , TypePath path , Type t , TypePath pathAdj , Type tAdj
681+ Access a , AccessPosition apos , Declaration target , TypePath path , Type t , TypePath pathAdj ,
682+ Type tAdj
682683 ) {
683- if apos .isSelf ( )
684+ if apos .isSelf ( ) and a . receiverImplicitlyBorrowed ( )
684685 then
685686 exists ( Type selfParamType |
686687 selfParamType = target .getParameterType ( TSelfDeclarationPosition ( ) , TypePath:: nil ( ) )
@@ -844,11 +845,13 @@ private module FieldExprMatchingInput implements MatchingInputSig {
844845 apos = dpos
845846 }
846847
847- bindingset [ apos, target, path, t]
848+ bindingset [ a , apos, target, path, t]
848849 pragma [ inline_late]
849850 predicate adjustAccessType (
850- AccessPosition apos , Declaration target , TypePath path , Type t , TypePath pathAdj , Type tAdj
851+ Access a , AccessPosition apos , Declaration target , TypePath path , Type t , TypePath pathAdj ,
852+ Type tAdj
851853 ) {
854+ exists ( a ) and
852855 exists ( target ) and
853856 if apos .isSelf ( )
854857 then
0 commit comments