| 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 bdcdc5a238c77ef0433210cdbc889ef9abc04874..69a6f9d919883c02ad4c2051cabb372233e36bcc 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -1352,7 +1352,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| }
|
| {
|
| DartMethodDefinition fB = (DartMethodDefinition) unit.getTopLevelNodes().get(1);
|
| - assertEquals("<dynamic>", fB.getElement().getReturnType().getElement().getName());
|
| + assertEquals("Dynamic", fB.getElement().getReturnType().getElement().getName());
|
| }
|
| {
|
| DartMethodDefinition fC = (DartMethodDefinition) unit.getTopLevelNodes().get(2);
|
| @@ -1360,7 +1360,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| }
|
| {
|
| DartMethodDefinition fD = (DartMethodDefinition) unit.getTopLevelNodes().get(3);
|
| - assertEquals("<dynamic>", fD.getElement().getReturnType().getElement().getName());
|
| + assertEquals("Dynamic", fD.getElement().getReturnType().getElement().getName());
|
| }
|
| }
|
|
|
| @@ -1966,6 +1966,27 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| }
|
| }
|
|
|
| + /**
|
| + * When we resolved method from inferred type, it is possible that arguments of invocation
|
| + * don't is not assignable to the parameters. So, we report warning. But if we would not infer
|
| + * types, there would be no warnings.
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=4849
|
| + */
|
| + public void test_inferredTypes_invocationOfMethodFromInferredType_arguments() throws Exception {
|
| + AnalyzeLibraryResult result = analyzeLibrary(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "class A {",
|
| + " foo(int p) {}",
|
| + "}",
|
| + "main() {",
|
| + " var a = new A();",
|
| + " a.foo('');",
|
| + "}",
|
| + "");
|
| + assertErrors(result.getErrors());
|
| + }
|
| +
|
| public void test_typesPropagation_assignAtDeclaration() throws Exception {
|
| analyzeLibrary(
|
| "f() {",
|
|
|