Skip to content

fuzzy arrows and covariant generics require more checks #29295

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
jmesserly opened this issue Apr 6, 2017 · 4 comments
Closed

fuzzy arrows and covariant generics require more checks #29295

jmesserly opened this issue Apr 6, 2017 · 4 comments

Comments

@jmesserly
Copy link

related to #27259, we're missing tests in covariant generic casts:

typedef F(x);
main() {
  F f = (int hi) => print(hi.isEven);
  List<dynamic> l = <String>['1'];
  l.map(f).toList();
}

DDC doesn't catch this at all and prints 'null'. VM does:

Unhandled exception:
NoSuchMethodError: Class 'String' has no instance getter 'isEven'.
Receiver: "1"
Tried calling: isEven
@leafpetersen
Copy link
Member

Just to be clear, my preferred solution for this is not adding more checks, but getting rid of fuzzy arrows.

@jmesserly
Copy link
Author

Good point Leaf! I've filed: #29299 and I'll mark this one blocked until we can get our internal code cleaned up w.r.t. fuzzy arrows and change static type system behavior.

@jmesserly
Copy link
Author

Blocked on #29630

@jmesserly jmesserly self-assigned this Jan 29, 2018
@jmesserly jmesserly removed the status-blocked Blocked from making progress by another (referenced) issue label Jan 29, 2018
@jmesserly
Copy link
Author

We're removing fuzzy arrow support from DDC runtime, so this is obsolete.

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

No branches or pull requests

3 participants