Skip to content
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

dart2dart renaming is breaking js-interop code #11440

Closed
vsmenon opened this issue Jun 21, 2013 · 0 comments
Closed

dart2dart renaming is breaking js-interop code #11440

vsmenon opened this issue Jun 21, 2013 · 0 comments
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue

Comments

@vsmenon
Copy link
Member

vsmenon commented Jun 21, 2013

The js-interop tests are breaking under dart2dart as properties forwarded to JS (and handled by NoSuchMethod) are renamed. E.g., the following is accessing container.Foo from the top-level JS context:

   final Foo2 = js.context.container.Foo;

and breaking as it is converted to:

   final Foo2=p_context.container.p_Foo;

by dart2dart. Here's the error:

Expectation: js instantiation : new Foo(). Caught NoSuchMethodError : method not found: 'p_Foo' Receiver: Instance of 'Proxy' Arguments: []
Proxy._forward http://127.0.0.1:3030/Users/vsm/git/js-interop/test/js/browser_tests.dart 569:6887
Proxy.noSuchMethod http://127.0.0.1:3030/Users/vsm/git/js-interop/test/js/browser_tests.dart 569:6535
main.<anonymous closure> http://127.0.0.1:3030/Users/vsm/git/js-interop/test/js/browser_tests.dart 1:1333

The workaround is to use map notation when using dart2dart:

js.context['container']['Foo'];

@sethladd sethladd added the closed-not-planned Closed as we don't intend to take action on the reported issue label Jul 10, 2015
@kevmoo kevmoo removed the triaged label Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue
Projects
None yet
Development

No branches or pull requests

3 participants