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

Unified Diff: tests/language/enum_is_keyword_test.dart

Issue 944813002: Make enum a keyword in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix comment. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/scanner/keyword.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/enum_is_keyword_test.dart
diff --git a/tests/compiler/dart2js/dart2js_batch2_run.dart b/tests/language/enum_is_keyword_test.dart
similarity index 62%
copy from tests/compiler/dart2js/dart2js_batch2_run.dart
copy to tests/language/enum_is_keyword_test.dart
index aee55ef18e5fa77c47bcbf53f5c16125299ed77a..2d24d94810ab6c41b7cc44c42d7a98d5116df763 100644
--- a/tests/compiler/dart2js/dart2js_batch2_run.dart
+++ b/tests/language/enum_is_keyword_test.dart
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-@notExisting
-var x;
+// Test that `enum` is considered a keyword and therefore invalid as the name of
+// declarations.
main() {
- print(x);
+ var enum; /// 01: compile-time error
}
« no previous file with comments | « pkg/compiler/lib/src/scanner/keyword.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698