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

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

Issue 11428131: More co19 triage. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 3068877a8b26d0234d406e432665d4c668e0830d..20559ef66000682afdded7a81c8e199fbe8f23f1 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java
@@ -7,7 +7,6 @@ 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;
import com.google.dart.compiler.ast.DartFunctionTypeAlias;
import com.google.dart.compiler.ast.DartIdentifier;
@@ -94,17 +93,9 @@ abstract class ResolveVisitor extends ASTVisitor<Element> {
@Override
public Element visitParameter(DartParameter node) {
- ErrorCode typeErrorCode;
- ErrorCode wrongNumberErrorCode;
- if (node.getParent() instanceof DartCatchBlock) {
- typeErrorCode = ResolverErrorCode.NO_SUCH_TYPE;
- wrongNumberErrorCode = ResolverErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS;
- } else {
- typeErrorCode = TypeErrorCode.NO_SUCH_TYPE;
- wrongNumberErrorCode = TypeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS;
- }
Type type = resolveType(node.getTypeNode(), ASTNodes.isStaticContext(node),
- ASTNodes.isFactoryContext(node), true, typeErrorCode, wrongNumberErrorCode);
+ ASTNodes.isFactoryContext(node), true, TypeErrorCode.NO_SUCH_TYPE,
+ TypeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS);
VariableElement element =
Elements.parameterElement(
getEnclosingElement(),

Powered by Google App Engine
This is Rietveld 408576698