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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java

Issue 9677055: Remove unused code in ResolveVisitor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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/resolver/Resolver.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/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());
+ }
}
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/Resolver.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698