Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Issue 796363003: dart2js: accept const map literals as expression statements. (Closed)

Created:
6 years ago by floitsch
Modified:
6 years ago
Reviewers:
ahe
CC:
reviews_dartlang.org, Johnni Winther
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

dart2js: accept const map literals as expression statements. Dart2js was broken for: <String, int> {}; The reason was that we tried to find an identifier after an initial type (looking for something like `Set<int> foo`) to parse a declaration. We assumed that the first token would be a type name and skipped the `<` when we did this search, thus believing that there was a declaration. BUG= http://dartbug.com/12793 BUG= http://dartbug.com/12794 BUG= http://dartbug.com/21155 R=ahe@google.com Committed: https://code.google.com/p/dart/source/detail?r=42356

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -8 lines) Patch
M pkg/compiler/lib/src/scanner/parser.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tests/co19/co19-dart2dart.status View 1 chunk +0 lines, -1 line 0 comments Download
M tests/co19/co19-dart2js.status View 1 chunk +0 lines, -1 line 0 comments Download
M tests/language/language_dart2js.status View 2 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
floitsch
6 years ago (2014-12-12 14:25:06 UTC) #2
ahe
Minor issue: fix is correct, but in the wrong method. No problems otherwise. https://codereview.chromium.org/796363003/diff/1/pkg/compiler/lib/src/scanner/parser.dart File ...
6 years ago (2014-12-12 14:32:42 UTC) #3
floitsch
Knowing that peekIdentifierAfterOptionalType is only called once simplifies the fix. PTAL. https://codereview.chromium.org/796363003/diff/1/pkg/compiler/lib/src/scanner/parser.dart File pkg/compiler/lib/src/scanner/parser.dart (left): ...
6 years ago (2014-12-12 14:38:47 UTC) #4
ahe
lgtm
6 years ago (2014-12-12 17:22:40 UTC) #5
floitsch
6 years ago (2014-12-13 17:13:06 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as 42356 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698