Description
This issue was originally filed by [email protected]
The specification in the section 10.14.1 says: "If getter lookup has also failed, then a new instance im of the predefined interface InvocationMirror is created by calling its factory constructor with arguments ‘m’, this, [o1, …, on] and {xn+1:on+1, …, xn+k : on+k}. Then the method noSuchMethod() is looked up in o and invoked with argument im, and the result of this invocation is the result of evaluating i."
The following test produces a static warning in dartc (r8145):
class A {
noSuchMethod(InvocationMirror im) { //static warning: 'no such type
//"InvocationMirror"'
return "v";
}
}
main() {
var classWithoutMethod = new A();
Expect.equals("v", classWithoutMethod.m());
}