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

Unified Diff: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java

Issue 10834222: Initial implementation of 'Create Method' quick fix (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use resolveUnit() in ASTProvider Created 8 years, 4 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/type/TypeAnalyzer.java
diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
index a6f774551e689cd6b1a7018221c7bb35b63ae296..279909481c58945d58edcd1c102258e84a1e62c0 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -958,6 +958,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
Type argumentType = argumentTypes.next();
argumentType.getClass(); // quick null check
DartExpression argumentNode = argumentNodes.get(argumentIndex);
+ argumentNode.setInvocationParameterId(argumentIndex);
if (argumentNode instanceof DartNamedExpression) {
onError(argumentNode, TypeErrorCode.EXPECTED_POSITIONAL_ARGUMENT, parameterType);
return ftype.getReturnType();
@@ -993,6 +994,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
Type argumentType = argumentTypes.next();
argumentType.getClass(); // quick null check
DartExpression argumentNode = argumentNodes.get(argumentIndex);
+ argumentNode.setInvocationParameterId(argumentIndex);
if (checkAssignable(argumentNode, namedType, argumentType)) {
inferFunctionLiteralParametersTypes(argumentNode, namedType);
}
@@ -1006,6 +1008,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
DartExpression argumentNode = namedExpression.getExpression();
// Prepare parameter name.
String parameterName = namedExpression.getName().getName();
+ argumentNode.setInvocationParameterId(parameterName);
if (usedNamedParametersPositional.contains(parameterName)) {
onError(namedExpression, TypeErrorCode.DUPLICATE_NAMED_ARGUMENT);
} else if (usedNamedParametersNamed.contains(parameterName)) {

Powered by Google App Engine
This is Rietveld 408576698