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

Issue 397593003: Disallow reserved words for "const Symbol(...)" with the exception of 'void'. (Closed)

Created:
6 years, 5 months ago by Paul Berry
Modified:
6 years, 4 months ago
CC:
reviews_dartlang.org, ricow1
Visibility:
Public.

Description

Disallow reserved words for "const Symbol(...)" with the exception of 'void'. R=lrn@google.com, scheglov@google.com Committed: https://code.google.com/p/dart/source/detail?r=38555

Patch Set 1 #

Patch Set 2 : Rebase on latest svn #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -2 lines) Patch
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantValueComputer.java View 1 chunk +1 line, -1 line 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/constant/ConstantValueComputerTest.java View 2 chunks +3 lines, -0 lines 0 comments Download
M tests/corelib/corelib.status View 1 2 chunks +71 lines, -0 lines 0 comments Download
A tests/corelib/symbol_reserved_word_test.dart View 1 chunk +48 lines, -0 lines 5 comments Download
M tests/lib/lib.status View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
Paul Berry
6 years, 5 months ago (2014-07-23 18:35:44 UTC) #1
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/397593003/diff/20001/tests/corelib/symbol_reserved_word_test.dart File tests/corelib/symbol_reserved_word_test.dart (right): https://codereview.chromium.org/397593003/diff/20001/tests/corelib/symbol_reserved_word_test.dart#newcode17 tests/corelib/symbol_reserved_word_test.dart:17: x = const Symbol('break'); /// 05: compile-time error ...
6 years, 5 months ago (2014-07-23 20:52:35 UTC) #2
scheglov
lgtm
6 years, 5 months ago (2014-07-24 18:15:34 UTC) #3
Paul Berry
https://codereview.chromium.org/397593003/diff/20001/tests/corelib/symbol_reserved_word_test.dart File tests/corelib/symbol_reserved_word_test.dart (right): https://codereview.chromium.org/397593003/diff/20001/tests/corelib/symbol_reserved_word_test.dart#newcode17 tests/corelib/symbol_reserved_word_test.dart:17: x = const Symbol('break'); /// 05: compile-time error On ...
6 years, 5 months ago (2014-07-24 21:40:47 UTC) #4
Paul Berry
Committed patchset #2 manually as r38555 (presubmit successful).
6 years, 5 months ago (2014-07-24 21:41:14 UTC) #5
ahe
6 years, 4 months ago (2014-08-04 14:28:05 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/397593003/diff/20001/tests/corelib/symbol_res...
File tests/corelib/symbol_reserved_word_test.dart (right):

https://codereview.chromium.org/397593003/diff/20001/tests/corelib/symbol_res...
tests/corelib/symbol_reserved_word_test.dart:17: x = const Symbol('break');   
/// 05: compile-time error
On 2014/07/24 21:40:47, Paul Berry wrote:
> On 2014/07/23 20:52:35, Lasse Reichstein Nielsen wrote:
> > I wouldn't mind just using '04: continued' here and below. I think it will
be
> > rare to fail some, but not all, of these cases.
> 
> Done.

That means you won't be testing each case. We don't count the number of
compile-time errors.

In practice, this means that it is possible to pass the new version of this test
by only rejecting const Symbol('assert').

Consequently, I think the test is now broken. Unless you would be just as happy
with the test if you removed the cases from "break" to "with".

Powered by Google App Engine
This is Rietveld 408576698