Skip to content

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

Closed
@kseo

Description

@kseo

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.

Metadata

Metadata

Assignees

Labels

web-js-interopIssues that impact all js interop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions