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

Closed
DartBot opened this issue Aug 31, 2014 · 2 comments
Closed

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

DartBot opened this issue Aug 31, 2014 · 2 comments
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant library-mirrors type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot 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: https://code.google.com/p/dart/issues/detail?id=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?

@anders-sandholm
Copy link
Contributor

Added Library-Mirrors, Area-Library, Triaged labels.

@floitschG
Copy link
Contributor

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.

@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed triaged labels Mar 1, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant library-mirrors type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

5 participants