@@ -667,12 +667,13 @@ private module CallExprBaseMatchingInput implements MatchingInputSig {
667667 apos = dpos
668668 }
669669
670- bindingset [ apos, target, path, t]
670+ bindingset [ a , apos, target, path, t]
671671 pragma [ inline_late]
672672 predicate adjustAccessType (
673- AccessPosition apos , Declaration target , TypePath path , Type t , TypePath pathAdj , Type tAdj
673+ Access a , AccessPosition apos , Declaration target , TypePath path , Type t , TypePath pathAdj ,
674+ Type tAdj
674675 ) {
675- if apos .isSelf ( )
676+ if apos .isSelf ( ) and a . receiverImplicitlyBorrowed ( )
676677 then
677678 exists ( Type selfParamType |
678679 selfParamType = target .getParameterType ( TSelfDeclarationPosition ( ) , TypePath:: nil ( ) )
@@ -836,11 +837,13 @@ private module FieldExprMatchingInput implements MatchingInputSig {
836837 apos = dpos
837838 }
838839
839- bindingset [ apos, target, path, t]
840+ bindingset [ a , apos, target, path, t]
840841 pragma [ inline_late]
841842 predicate adjustAccessType (
842- AccessPosition apos , Declaration target , TypePath path , Type t , TypePath pathAdj , Type tAdj
843+ Access a , AccessPosition apos , Declaration target , TypePath path , Type t , TypePath pathAdj ,
844+ Type tAdj
843845 ) {
846+ exists ( a ) and
844847 exists ( target ) and
845848 if apos .isSelf ( )
846849 then
0 commit comments