Skip to content

Different behavior between VM an dart2js version / Uncaught exception in js_helper #21

Description

@MikeMitterer

Just want to let you know there is a problem between the VM and the dart2js version.

abstract class Name {
    String get firstName;
}

// Fails if compiled to JS - it works with "extends"!!!!!!
class NameImpl implements Name {

  @override
  String get firstName => "Mike";
}

class ExampleModule extends dice.Module {
    configure() {
        register(Name).toInstance(new NameImpl());

    }
}

main() async {
    final dice.Injector injector = new dice.Injector(new ExampleModule());
    final Name name = injector.getInstance(Name);

   print(name.firstName);
}

More infos here: dart-lang/sdk#25715 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions