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

Unified Diff: tests/language/src/CompileTimeConstantCTest.dart

Issue 9665001: Implement constant maps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove trailing whitespace. Created 8 years, 9 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 | « tests/language/src/CompileTimeConstantBTest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/CompileTimeConstantCTest.dart
diff --git a/tests/language/src/CompileTimeConstantCTest.dart b/tests/language/src/CompileTimeConstantCTest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..452b11c68f85e5928f47f638875bfc9c771118f5
--- /dev/null
+++ b/tests/language/src/CompileTimeConstantCTest.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2012, 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.
+
+final m1 = const {
+ 499: 400 + 99 /// 01: compile-time error
+};
+final m2 = const {
+ "foo" + "bar": 42 /// 02: compile-time error
+};
+
+use(x) => x;
+
+main() {
+ use(m1);
+ use(m2);
+}
« no previous file with comments | « tests/language/src/CompileTimeConstantBTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698