Skip to content

Dartium throws an internal error when when class with @JS annotation is private #25038

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

Closed
kseo opened this issue Nov 25, 2015 · 1 comment
Closed
Assignees
Labels
web-js-interop Issues that impact all js interop

Comments

@kseo
Copy link

kseo commented Nov 25, 2015

The following code snippet throws an internal error in Dartium.

@JS('CaretPosition')
class _CaretPosition {
  external Node get offsetNode;
  external int get offset;
}

Here's the error log from Dartium console.

Internal error: 'JsInteropImpl.dart': malformed type: line 2 pos 48: cannot resolve class 'lib._CaretPosition@342649749' from 'JsObjectImpl'
class JsObjectImpl extends JsObject implements lib._CaretPosition {

After changing the class name to CaretPosition, Dartium no longer complains.

Both public and private names work okay in dart2js.

@alan-knight alan-knight added the web-js-interop Issues that impact all js interop label Nov 25, 2015
@jacob314 jacob314 self-assigned this Jul 8, 2016
@jacob314 jacob314 mentioned this issue Jul 8, 2016
19 tasks
jacob314 added a commit that referenced this issue Jul 19, 2016
…erop objects in a dynamic manner. Fix for @js classes that are _private. Bug #25038 @js on a _Private class in Dartium

Tests are in the separate Dart2JS CL

BUG=
R=alanknight@google.com

Review URL: https://codereview.chromium.org/2158493003 .
@jacob314
Copy link
Member

jacob314 commented Jul 19, 2016

fixed by change 1bbb2a6c933ce3c93962870aa6ca12468688d512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-js-interop Issues that impact all js interop
Projects
None yet
Development

No branches or pull requests

4 participants