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

Unified Diff: tests/language/const_local_test.dart

Issue 348053002: dart2dart: Support for all constants in new backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: SVN rebase + merge Created 6 years, 6 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/const_list_test.dart ('k') | tests/language/const_map4_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/const_local_test.dart
diff --git a/tests/compiler/dart2js_extra/member_namespace_test.dart b/tests/language/const_local_test.dart
similarity index 63%
copy from tests/compiler/dart2js_extra/member_namespace_test.dart
copy to tests/language/const_local_test.dart
index ff65d20654530e198d30621434db8f6da69d48e6..bc5b71bddc8c034deb140b38765f1672e359c6f0 100644
--- a/tests/compiler/dart2js_extra/member_namespace_test.dart
+++ b/tests/language/const_local_test.dart
@@ -4,16 +4,14 @@
import "package:expect/expect.dart";
-class A {
- static int a;
- A();
- static foo() {
- // Make sure 'A' is not resolved to the constructor.
- return A.a;
- }
+main() {
+ const a = 1;
+ Expect.equals(1, a);
+ Expect.equals(1, const A(a).a);
+ Expect.equals(1, const [const A(a)][0].a);
}
-main() {
- A.a = 42;
- Expect.equals(42, A.foo());
+class A {
+ final a;
+ const A(this.a);
}
« no previous file with comments | « tests/language/const_list_test.dart ('k') | tests/language/const_map4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698