@@ -675,12 +675,13 @@ private module CallExprBaseMatchingInput implements MatchingInputSig {
675
675
apos = dpos
676
676
}
677
677
678
- bindingset [ apos, target, path, t]
678
+ bindingset [ a , apos, target, path, t]
679
679
pragma [ inline_late]
680
680
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
682
683
) {
683
- if apos .isSelf ( )
684
+ if apos .isSelf ( ) and a . receiverImplicitlyBorrowed ( )
684
685
then
685
686
exists ( Type selfParamType |
686
687
selfParamType = target .getParameterType ( TSelfDeclarationPosition ( ) , TypePath:: nil ( ) )
@@ -844,11 +845,13 @@ private module FieldExprMatchingInput implements MatchingInputSig {
844
845
apos = dpos
845
846
}
846
847
847
- bindingset [ apos, target, path, t]
848
+ bindingset [ a , apos, target, path, t]
848
849
pragma [ inline_late]
849
850
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
851
853
) {
854
+ exists ( a ) and
852
855
exists ( target ) and
853
856
if apos .isSelf ( )
854
857
then
0 commit comments