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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ValidResult.java

Issue 23382010: Fix for issue 12367 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ValidResult.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ValidResult.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ValidResult.java
index 172416fd4176eafb96357c7257cec796fed50ced..1ae03bf702c1a15cbe33f2ebd8221622f3b66249 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ValidResult.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ValidResult.java
@@ -277,7 +277,9 @@ public class ValidResult extends EvaluationResultImpl {
if (!isAnyNum() || !leftOperand.isAnyNum()) {
return error(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
}
- if (isSomeNum() || leftOperand.isSomeNum()) {
+ if (isSomeInt() || leftOperand.isSomeInt()) {
+ return RESULT_INT;
+ } else if (isSomeNum() || leftOperand.isSomeNum()) {
return RESULT_NUM;
}
Object leftValue = leftOperand.getValue();
@@ -721,7 +723,9 @@ public class ValidResult extends EvaluationResultImpl {
if (!isAnyNum() || !leftOperand.isAnyNum()) {
return error(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
}
- if (isSomeNum() || leftOperand.isSomeNum()) {
+ if (isSomeInt() || leftOperand.isSomeInt()) {
+ return RESULT_INT;
+ } else if (isSomeNum() || leftOperand.isSomeNum()) {
return RESULT_NUM;
}
Object leftValue = leftOperand.getValue();
@@ -796,7 +800,9 @@ public class ValidResult extends EvaluationResultImpl {
if (!isAnyNum() || !leftOperand.isAnyNum()) {
return error(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
}
- if (isSomeNum() || leftOperand.isSomeNum()) {
+ if (isSomeInt() || leftOperand.isSomeInt()) {
+ return RESULT_INT;
+ } else if (isSomeNum() || leftOperand.isSomeNum()) {
return RESULT_NUM;
}
Object leftValue = leftOperand.getValue();
@@ -894,7 +900,9 @@ public class ValidResult extends EvaluationResultImpl {
if (!isAnyNum() || !leftOperand.isAnyNum()) {
return error(node, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
}
- if (isSomeNum() || leftOperand.isSomeNum()) {
+ if (isSomeInt() || leftOperand.isSomeInt()) {
+ return RESULT_INT;
+ } else if (isSomeNum() || leftOperand.isSomeNum()) {
return RESULT_NUM;
}
Object leftValue = leftOperand.getValue();
« 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