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

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

Issue 12741006: Issue 9084. Don't recompute binary operator RHS argument type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d1c574178b393744a2e8c87cc17a9ec138fb1434..8b65198d565bb31b2c78856ddcfd2fbc229eb4fa 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -378,6 +378,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
FunctionType methodType = getMethodType(lhsType, member, methodName, diagnosticNode);
checkDeprecated(problemTarget, element);
Type returnType = checkInvocation(Collections.<DartExpression> singletonList(rhs),
+ Collections.<Type> singletonList(rhsType),
diagnosticNode, methodName, methodType, null);
// tweak return type for int/int and int/double operators
{
@@ -2794,6 +2795,11 @@ public class TypeAnalyzer implements DartCompilationPhase {
Type argumentType = getInvocationArgumentType(argumentNode);
argumentTypes.add(argumentType);
}
+ return checkInvocation(argumentNodes, argumentTypes, diagnosticNode, name, type, parameters);
+ }
+
+ private Type checkInvocation(List<DartExpression> argumentNodes, List<Type> argumentTypes,
+ DartNode diagnosticNode, String name, Type type, List<VariableElement> parameters) {
// Check that argument types are compatible with type of invoked object.
try {
switch (TypeKind.of(type)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698