| 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 00ad1532e4e2965e4305b3062460ae530628f81f..5cfdaf7debcef77a4b46617e112c101bcbddc9d4 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -2231,6 +2231,28 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| "");
|
| assertInferredElementTypeString(libraryResult, "v", "Event");
|
| }
|
| +
|
| + /**
|
| + * We should infer closure parameter types even in {@link FunctionType} is specified directly,
|
| + * without using {@link FunctionAliasType}.
|
| + */
|
| + public void test_typesPropagation_parameterOfClosure_functionType() throws Exception {
|
| + AnalyzeLibraryResult libraryResult = analyzeLibrary(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "class Event {}",
|
| + "class Button<T> {",
|
| + " onClick(listener(T e)) {",
|
| + " }",
|
| + "}",
|
| + "main() {",
|
| + " var button = new Button<Event>();",
|
| + " button.onClick((e) {",
|
| + " var v = e;",
|
| + " });",
|
| + "}",
|
| + "");
|
| + assertInferredElementTypeString(libraryResult, "v", "Event");
|
| + }
|
|
|
| public void test_getType_binaryExpression() throws Exception {
|
| AnalyzeLibraryResult libraryResult = analyzeLibrary(
|
|
|