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

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: 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
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..4fc8158289d1037278b70add5bacf8edc7c667a9
--- /dev/null
+++ b/tests/language/src/CompileTimeConstantHTest.dart
@@ -0,0 +1,19 @@
+// 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.
+// Dart test program for testing setting/getting of instance fields.
ngeoffray 2012/03/18 13:56:04 Please update description.
floitsch 2012/03/18 18:44:15 Removed comment. Done.
+
+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);
+}

Powered by Google App Engine
This is Rietveld 408576698