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

Unified Diff: tests/language/cascade_2_test.dart

Issue 11745028: Fix incorrect desugaring of cascades. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 12 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/cascade_2_test.dart
diff --git a/tests/language/cascade_2_test.dart b/tests/language/cascade_2_test.dart
index 7ec06f9afa3f3288eaace2dcbcb51111e121ef03..2675f61ac546e7f9663951f2ca13b10f9690779a 100644
--- a/tests/language/cascade_2_test.dart
+++ b/tests/language/cascade_2_test.dart
@@ -2,15 +2,17 @@
// 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.
-// Test cascades, issue 7665.
+// Test cascades, issues 7494 (vm), 7689 (dart2js).
main() {
var a = new Element(null);
Expect.equals(1, a.path0.length);
Expect.equals(a, a.path0[0]);
- Expect.equals(1, a.path1.length); // 2 instead of 1
+ // Issue 7693: e0 ? e1 : e2..f() parses as (e0 ? e1 : e2)..f().
+ Expect.equals(2, a.path1.length);
Expect.equals(a, a.path1[0]);
+ Expect.equals(a, a.path1[1]);
Expect.equals(1, a.path2.length); // NPE.
@@ -19,9 +21,10 @@ main() {
Expect.equals(a, b.path0[0]);
Expect.equals(b, b.path0[1]);
- Expect.equals(2, b.path1.length); // 3 instead of 2.
+ Expect.equals(3, b.path1.length);
Expect.equals(a, b.path1[0]);
- Expect.equals(b, b.path1[1]);
+ Expect.equals(a, b.path1[1]);
+ Expect.equals(b, b.path1[2]);
Expect.equals(2, b.path2.length); // NPE.
}
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698