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

Implement isSubtypeOf() and isAssignableTo() in js_mirrors.dart #20756

DartBot opened this issue Aug 31, 2014 · 2 comments


None yet
5 participants
Copy link

commented Aug 31, 2014

This issue was originally filed by @Scorpiion

I know that js_mirrors.dart is not complete and I'm aware of the tracking bug 6490:

I have a JSON serliazation library called VaneModel that works good on the Dart VM but when compiling to JavaScript it stopped working because of these 2 missing implementations.

File js_mirrors.dart, class JsTypeMirror:
  bool isSubtypeOf(TypeMirror other) => throw new UnimplementedError();
  bool isAssignableTo(TypeMirror other) => throw new UnimplementedError();

I create this bug as a way to track progress on this. Would be interesting to hear if someone with knowledge of js_mirrors.dart could estimate the amount of work needed? Would it be possible to fix this in weeks or are there big blocking issues so I should expect several months? Or longer?


This comment has been minimized.

Copy link

commented Sep 1, 2014


This comment has been minimized.

Copy link

commented Sep 1, 2014

Implementing those is unfortunately not straightforward due to generic types: eg List<int> is not assignable to List<String>.

If you don't care about generic types, you could implement a substitute by walking the superinterfaces yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.