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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java

Issue 11043024: Fix for field resolution for cascade, tests for ensure this (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/type/TypeAnalyzerCompilerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index dd0d3e65c6daadaaa3b7bd95fcd463e7354b47b4..c2ca8618ff53eb3d8f72a3fb17c25084dc7dd379 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -33,6 +33,7 @@ import com.google.dart.compiler.ast.DartIdentifier;
import com.google.dart.compiler.ast.DartInvocation;
import com.google.dart.compiler.ast.DartMapLiteralEntry;
import com.google.dart.compiler.ast.DartMethodDefinition;
+import com.google.dart.compiler.ast.DartMethodInvocation;
import com.google.dart.compiler.ast.DartNewExpression;
import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.ast.DartParameter;
@@ -4392,6 +4393,10 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
"}",
"");
assertErrors(libraryResult.getErrors());
+ {
+ DartPropertyAccess access = findNode(DartPropertyAccess.class, "f = 1");
+ assertNotNull(access.getElement());
+ }
}
/**
@@ -4402,16 +4407,20 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
AnalyzeLibraryResult libraryResult = analyzeLibrary(
"// filler filler filler filler filler filler filler filler filler filler",
"class A {",
- " int m() {}",
+ " int m(p) {}",
"}",
"main() {",
" A a = new A();",
" a",
- " ..m()",
- " ..m();",
+ " ..m(1)",
+ " ..m(2);",
"}",
"");
assertErrors(libraryResult.getErrors());
+ {
+ DartMethodInvocation invocation = findNode(DartMethodInvocation.class, "m(1)");
+ assertNotNull(invocation.getElement());
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698