Open
Description
This issue derieved from the test mentioned in #55803 (comment). I didn't find a separate github item for this issue. Feel free to close this one as a duplicate if there is such one.
class BNSMC {
// Should be NSM-forwarder.
int Function(int) get call;
Object? noSuchMethod(Invocation i) {
if (i.memberName == #call) {
print("isMethod=${i.isMethod}"); // false
print("isGetter=${i.isGetter}"); // true
return (int x) => x;
}
return super.noSuchMethod(i);
}
}
void main() {
(BNSMC() as dynamic)(42);
}
Here we have an attempt to invoke a call
method, not a getter, so isMethod
and isGetter
should have opposite values.
cc @lrhn @eernstg to confirm.