-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement InvocationMirror and use them for noSuchMethod #3326
Comments
Mirrors are currently not implemented, so this is the expected behavior. The implementations of the language are not completely up to speed with respect to the spec. Updating bug report summary. Added Area-VM, Triaged labels. |
Marked this as blocking #3524. |
Issue #1346 has been merged into this issue. |
Marked this as blocking #5294. |
Issue #6887 has been merged into this issue. |
Issue #3565 has been merged into this issue. |
Looks like the InvocationMirror is missing named arguments. Not fixed yet. Added this to the M2 milestone. |
As far as I can tell this is fixed with r15939. Regis? Set owner to @crelier. |
Correct. Added Fixed label. |
Awesome! |
This comment was originally written by rodion...@unipro.ru this still fails: class TestException {} class A { class C { main() { It still shows a NoSuchMethodError, but it comes from Object (I guess): Unhandled exception: |
This comment was originally written by rodion...@unipro.ru that's |
Fixed in r16220. Added Fixed label. |
This issue was originally filed by ms...@unipro.ru
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());
}
The text was updated successfully, but these errors were encountered: