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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java

Issue 10986095: Additional fixes for cascades (issue 5146) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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: compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
===================================================================
--- compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java (revision 13022)
+++ compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java (working copy)
@@ -1130,8 +1130,34 @@
" }",
"}"),
ResolverErrorCode.TYPE_VARIABLE_NOT_ALLOWED_IN_IDENTIFIER);
- }
+ }
+ public void test_cascade_complex() {
+ resolveAndTest(Joiner.on("\n").join(
+ "class Object {}",
+ "class Spline {",
+ " Spline a() {",
+ " return this;",
+ " }",
+ " Line b() {",
+ " return null;",
+ " }",
+ " Spline f() {",
+ " Line x = new Line();",
+ " x.h()..a()..b().g();",
+ " }",
+ "}",
+ "class Line {",
+ " Line g() {",
+ " return this;",
+ " }",
+ " Spline h() {",
+ " return null;",
+ " }",
+ "}"
+ ));
+ }
+
/**
* When {@link SupertypeResolver} can not find "UnknownA", it uses {@link DynamicType}, which
* returns {@link DynamicElement}. By itself, this is OK. However when we later try to resolve

Powered by Google App Engine
This is Rietveld 408576698