| Index: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| index 08f12d8e9cd360ea18c76b06f2c4ec30c10f8473..ef159e20d527aacaf49c364a70ae3f45409738ae 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| @@ -8,10 +8,13 @@ import static com.google.dart.compiler.common.ErrorExpectation.errEx;
|
|
|
| import com.google.dart.compiler.CompilerTestCase;
|
| import com.google.dart.compiler.DartCompilationError;
|
| +import com.google.dart.compiler.ast.DartFunctionTypeAlias;
|
| import com.google.dart.compiler.ast.DartThisExpression;
|
| +import com.google.dart.compiler.ast.DartTypeParameter;
|
| import com.google.dart.compiler.ast.DartUnit;
|
| import com.google.dart.compiler.common.ErrorExpectation;
|
| import com.google.dart.compiler.testing.TestCompilerContext;
|
| +import com.google.dart.compiler.type.Type;
|
|
|
| import java.util.ArrayList;
|
| import java.util.List;
|
| @@ -1150,4 +1153,20 @@ public class NegativeResolverTest extends CompilerTestCase {
|
| "}"),
|
| errEx(ResolverErrorCode.DEFAULT_CONSTRUCTOR_UNRESOLVED, 4, 3, 4));
|
| }
|
| +
|
| + public void test_resolvedTypeVariableBounds_inFunctionTypeAlias() throws Exception {
|
| + DartUnit unit =
|
| + parseUnit(
|
| + getName(),
|
| + makeCode(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "class A {}",
|
| + "typedef T Foo<T extends A>();",
|
| + ""));
|
| + resolve(unit);
|
| + DartFunctionTypeAlias func = (DartFunctionTypeAlias) unit.getTopLevelNodes().get(1);
|
| + DartTypeParameter typeParameter = func.getTypeParameters().get(0);
|
| + Type boundType = typeParameter.getBound().getType();
|
| + assertEquals("A", boundType.getElement().getName());
|
| + }
|
| }
|
|
|