Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Dart2: Compliance with ignored type cast failure #841

Closed
2 tasks done
matanlurey opened this issue Feb 6, 2018 · 2 comments
Closed
2 tasks done

Dart2: Compliance with ignored type cast failure #841

matanlurey opened this issue Feb 6, 2018 · 2 comments

Comments

@matanlurey
Copy link
Contributor

matanlurey commented Feb 6, 2018

Currently in DDC, the following type-casts are ignored, but should fail:

List<dynamic> a = ['a', 'a', 'a'];

// Should be List<dynamic> cannot be List<String>.
List<String> b = a;

These are warnings in the development console (at runtime), but not errors. The language team is attempting to make these errors in DDC, as they will also be errors in the CFE-driven backends (eventually DDK and Dart2JS on Kernel?).

This is the master tracking issue for places in AngularDart we are violating either explicitly (in the runtime, which is easier to change) or implicitly (in the code we generate, which is more difficult to change).

I believe @leonsenft knows of some cases (with list/map literals), right?

/cc @MichaelRFairhurst @srawlins @munificent @leafpetersen.

@matanlurey
Copy link
Contributor Author

I'm working on #688 towards this end.

@kevmoo
Copy link
Member

kevmoo commented Mar 12, 2018

@matanlurey – can close?

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

No branches or pull requests

2 participants