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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/GenericState.java

Issue 273703003: Don't generate errors when failing to follow const constructor redirections. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/GenericState.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/GenericState.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/GenericState.java
index 8f1bffb26c558a67932e55bb5fa27af1c6cb1aaa..5eb51b83c3a5e13d0c7eb9980612f98dab0b5606 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/GenericState.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/GenericState.java
@@ -47,6 +47,15 @@ public class GenericState extends InstanceState {
}
@Override
+ public BoolState equalEqual(InstanceState rightOperand) throws EvaluationException {
+ assertBoolNumStringOrNull(rightOperand);
+ if (rightOperand instanceof DynamicState) {
+ return BoolState.UNKNOWN_VALUE;
+ }
+ return BoolState.from(equals(rightOperand));
+ }
+
+ @Override
public boolean equals(Object object) {
if (!(object instanceof GenericState)) {
return false;
@@ -68,15 +77,6 @@ public class GenericState extends InstanceState {
}
@Override
- public BoolState equalEqual(InstanceState rightOperand) throws EvaluationException {
- assertBoolNumStringOrNull(rightOperand);
- if (rightOperand instanceof DynamicState) {
- return BoolState.UNKNOWN_VALUE;
- }
- return BoolState.from(equals(rightOperand));
- }
-
- @Override
public String getTypeName() {
return "user defined type";
}
@@ -89,4 +89,9 @@ public class GenericState extends InstanceState {
}
return hashCode;
}
+
+ @Override
+ public boolean isUnknown() {
+ return this == UNKNOWN_VALUE;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698