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

Dynamic type errors during construction of literal lists and maps #628

Closed
peter-ahe-google opened this issue Nov 29, 2011 · 3 comments
Closed
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Milestone

Comments

@peter-ahe-google
Copy link
Contributor

For list literals, the spec says:

"The ith element of a is set to oi+1 , 0<=i<=n"

I don't think it is clear that setting the ith element implies a dynamic type error if oi+1 is not a subtype of the element type of the list literal. Similarly, it is not obvious what happens for compile-time constants with dynamic type errors.

@gbracha
Copy link
Contributor

gbracha commented Nov 30, 2011

Set owner to @gbracha.
Added Accepted label.

@anders-sandholm
Copy link
Contributor

Added this to the M1 milestone.

@gbracha
Copy link
Contributor

gbracha commented May 17, 2012

Fixed this for lists and maps. Described in terms of invoking operator []=. The situation wrt to failure of constants is already specified in section 10.1.


Added Done label.

@peter-ahe-google peter-ahe-google added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels May 17, 2012
@peter-ahe-google peter-ahe-google added this to the M1 milestone May 17, 2012
dart-bot pushed a commit that referenced this issue Oct 25, 2019
Update spec_parser to enable configurableUri in deferred imports,
make cascade syntax compositional, include `extension` declarations,
add `late` as a built-in identifier, and reorder the lexical rules for
single words such that they are grouped into reserved words, built-in
identifiers, and "other words known by the grammar".

Cf. language issue #615, #627, #628, #638.

Change-Id: If60b2ba2ca0e7d4bbc9b4e886857f657fb14c809
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121991
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Projects
None yet
Development

No branches or pull requests

4 participants