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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java

Issue 10991064: Issue 5350. Type variable should be accessible in instance field (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
Index: compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java b/compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java
index 4250d39cea57014d27f29f8f5c273d93f840b461..666b0e9fd63e35d555bf3acfbc3eeba320c16794 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java
@@ -5,6 +5,7 @@
package com.google.dart.compiler.resolver;
import com.google.dart.compiler.ErrorCode;
+import com.google.dart.compiler.ast.ASTNodes;
import com.google.dart.compiler.ast.ASTVisitor;
import com.google.dart.compiler.ast.DartCatchBlock;
import com.google.dart.compiler.ast.DartFunction;
@@ -85,10 +86,6 @@ abstract class ResolveVisitor extends ASTVisitor<Element> {
return null;
}
- abstract boolean isStaticContext();
-
- abstract boolean isFactoryContext();
-
@Override
public Element visitParameter(DartParameter node) {
ErrorCode typeErrorCode;
@@ -100,8 +97,8 @@ abstract class ResolveVisitor extends ASTVisitor<Element> {
typeErrorCode = TypeErrorCode.NO_SUCH_TYPE;
wrongNumberErrorCode = TypeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS;
}
- Type type = resolveType(node.getTypeNode(), isStaticContext(), isFactoryContext(), true,
- typeErrorCode, wrongNumberErrorCode);
+ Type type = resolveType(node.getTypeNode(), ASTNodes.isStaticContext(node),
+ ASTNodes.isFactoryContext(node), true, typeErrorCode, wrongNumberErrorCode);
VariableElement element =
Elements.parameterElement(
getEnclosingElement(),

Powered by Google App Engine
This is Rietveld 408576698