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

Unified Diff: tests/language/cascade_in_initializer_list_test.dart

Issue 12036005: Allow cascades in initializer lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove inadvertently pasted comment. Created 7 years, 11 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 | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/cascade_in_initializer_list_test.dart
diff --git a/tests/compiler/dart2js_extra/regress/4515_3_test.dart b/tests/language/cascade_in_initializer_list_test.dart
similarity index 62%
copy from tests/compiler/dart2js_extra/regress/4515_3_test.dart
copy to tests/language/cascade_in_initializer_list_test.dart
index 319eb0cac719a777093aa372c3e2f0e27b396612..c1e592e2f255c6dbc96bd65d42d69530b630b8ca 100644
--- a/tests/compiler/dart2js_extra/regress/4515_3_test.dart
+++ b/tests/language/cascade_in_initializer_list_test.dart
@@ -3,18 +3,17 @@
// BSD-style license that can be found in the LICENSE file.
class A {
- a(x) => x + 1;
+ foo() {}
+ bar() {}
}
-f(p) => p("A");
+class B {
+ var x;
-main() {
- A a = new A();
- a.a(1);
- var v = null;
- try {
- v = f(a.a);
- } catch (e) { }
-
- Expect.equals(null, v);
+ B(a) : x = a..foo()..bar() {}
}
+
+main() {
+ var a = new A(), b = new B(a);
+ Expect.equals(a, b.x);
+}
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698