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

Collection literal error regression when using experiments #36201

Closed
nshahan opened this Issue Mar 13, 2019 · 3 comments

Comments

Projects
None yet
4 participants
@nshahan
Copy link
Contributor

nshahan commented Mar 13, 2019

When running with the experiment spread-collections or control-flow-collections defining a map literal but only one type does not produce an error.

var foo = <int>{1:2, 3:4};

You will get a set containing {1, 2, 3, 4}.

There is a test for this but I don't think the code path is being exercised without the experiment flags.
https://github.com/dart-lang/sdk/blob/master/tests/language_2/set_literals/invalid_set_literal_test.dart#L15

@nshahan nshahan added this to the Dart2.3 milestone Mar 13, 2019

@nshahan

This comment has been minimized.

Copy link
Contributor Author

nshahan commented Mar 13, 2019

@vsmenon

This comment has been minimized.

Copy link
Member

vsmenon commented Mar 14, 2019

@bwilkerson bwilkerson self-assigned this Mar 14, 2019

@lrhn lrhn added the type-bug label Mar 15, 2019

@bwilkerson

This comment has been minimized.

Copy link
Member

bwilkerson commented Mar 15, 2019

I believe that this should be fixed by https://dart-review.googlesource.com/c/sdk/+/96985. It will likely produce a different error message than before, but I don't think that matters.

If that does not solve the problem you're seeing, please re-open the issue.

@bwilkerson bwilkerson closed this Mar 15, 2019

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.