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

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

Issue 10928033: Fix internal exception when assignment happens in initializer (Closed) Base URL: https://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
« no previous file with comments | « compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7aeb6f21d358b4dc7d27c7705c3221842fcd5559..b03409596d6b11bde2265845346821a25e0c0df8 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -2276,6 +2276,22 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
}
/**
+ * There was bug that when we analyze assignment in initializer, we don't have context.
+ */
+ public void test_typesPropagation_multiAssign_assignmentOutsideFunction() throws Exception {
+ analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " A(p) {}",
+ "}",
+ "class B extends A {",
+ " B(p) : super(p = 0) {}",
+ "}",
+ "");
+ // no exceptions
+ }
+
+ /**
* When we can not identify type of assigned value we should keep "Dynamic" as type of variable.
*/
public void test_typesPropagation_assign_newUnknownType() throws Exception {
« no previous file with comments | « compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698