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

Unified Diff: tests/compiler/dart2js_extra/private_symbol_literal_test.dart

Issue 21511003: Support symbol literals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 3 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
Index: tests/compiler/dart2js_extra/private_symbol_literal_test.dart
diff --git a/tests/compiler/dart2js_extra/private_symbol_literal_test.dart b/tests/compiler/dart2js_extra/private_symbol_literal_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..31a278310e2901733b38735616af91a1005f9244
--- /dev/null
+++ b/tests/compiler/dart2js_extra/private_symbol_literal_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// 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.
+
+// Test symbol literals with underscores.
+// These are currently unsupported by dart2js.
+
+library symbol_literal_test;
+
+main() {
+ print(#a);
+ print(#_a); /// 01: compile-time error
+
+ print(#a.b);
+ print(#_a.b); /// 02: compile-time error
+ print(#a._b); /// 03: compile-time error
+
+ print(#a.b.c);
+ print(#_a.b.c); /// 04: compile-time error
+ print(#a._b.c); /// 05: compile-time error
+ print(#a.b._c); /// 06: compile-time error
+}

Powered by Google App Engine
This is Rietveld 408576698