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 ac090626ba4e591e74a0b17e466ba71c365a8b19..009b9666c38bf738a17e5baeb4896877a9e1751c 100644 |
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
@@ -489,7 +489,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase { |
errEx(TypeErrorCode.SETTER_RETURN_TYPE, 4, 3, 7), |
errEx(TypeErrorCode.SETTER_RETURN_TYPE, 5, 3, 4)); |
} |
- |
+ |
public void test_callUnknownFunction() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
"// filler filler filler filler filler filler filler filler filler filler", |
@@ -1738,6 +1738,21 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase { |
}); |
return result[0]; |
} |
+ |
+ /** |
+ * <p> |
+ * http://code.google.com/p/dart/issues/detail?id=3272 |
+ */ |
+ public void test_assignVoidToDynamic() throws Exception { |
+ AnalyzeLibraryResult libraryResult = analyzeLibrary( |
+ "// filler filler filler filler filler filler filler filler filler filler", |
+ "void foo() {}", |
+ "main() {", |
+ " var v = foo();", |
+ "}", |
+ ""); |
+ assertErrors(libraryResult.getErrors()); |
+ } |
private AnalyzeLibraryResult analyzeLibrary(String... lines) throws Exception { |
return analyzeLibrary(getName(), makeCode(lines)); |