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

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

Issue 9717035: Handle compile-time constants to interfaces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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/CompileTimeConstantGTest.dart ('k') | tests/standalone/standalone-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/CompileTimeConstantHTest.dart
diff --git a/tests/language/src/CompileTimeConstantHTest.dart b/tests/language/src/CompileTimeConstantHTest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..734f6f8a9754a08d43309aa711b6ca54a8f8347b
--- /dev/null
+++ b/tests/language/src/CompileTimeConstantHTest.dart
@@ -0,0 +1,18 @@
+// 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.
+
+class A implements B {
+ final x = 4;
+ const A(this.x);
+}
+
+interface B default A {
+ const B(x);
+}
+
+final b1 = const B(499);
+
+main() {
+ Expect.equals(499, b1.x);
+}
« no previous file with comments | « tests/language/src/CompileTimeConstantGTest.dart ('k') | tests/standalone/standalone-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698