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

Some primary expressions cannot form statements #1489

Closed
dgrove opened this issue Feb 2, 2012 · 5 comments
Closed

Some primary expressions cannot form statements #1489

dgrove opened this issue Feb 2, 2012 · 5 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request
Milestone

Comments

@dgrove
Copy link
Contributor

dgrove commented Feb 2, 2012

r3865 (cloned from issue #1228)

The Dart spec v0.006 states that any expression can form a statement.

However, dartc yields compile error if function expression, list literal, or map literal are used as statements:

main() {
  void() g{};
  {"1" : 1, "2": 2};
  [null, 0, "O"];
}

@kasperl
Copy link

kasperl commented Apr 17, 2012

Removed Area-Compiler label.
Added Area-Analyzer label.

@bwilkerson
Copy link
Member

Added this to the M1 milestone.
Removed Priority-Medium label.
Added Priority-Low label.

@bwilkerson
Copy link
Member

The first case (a function literal) is still a valid problem.

The second case is no longer allowed by the spec. (see section 11.2 and issue #3777).

The third case has been fixed.

@danrubel
Copy link

Set owner to @bwilkerson.

@bwilkerson
Copy link
Member

http://codereview.chromium.org/10823014/

Note that the example in this issue is not valid, but dartc was producing a warning that it should not have been.


Added Fixed label.

@dgrove dgrove added Type-Defect P3 A lower priority bug or feature request area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Jul 25, 2012
@dgrove dgrove added this to the M1 milestone Jul 25, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request
Projects
None yet
Development

No branches or pull requests

4 participants