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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/VoidTypeImpl.java

Issue 62523002: Fix for 11987. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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/type/VoidTypeImpl.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/VoidTypeImpl.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/VoidTypeImpl.java
index 3589b278b85703088aeeaa03d231fe8bdd49b25d..a238cecf3bdb81ddc998e6faadabc40445bd5ef4 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/VoidTypeImpl.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/VoidTypeImpl.java
@@ -17,6 +17,8 @@ import com.google.dart.engine.scanner.Keyword;
import com.google.dart.engine.type.Type;
import com.google.dart.engine.type.VoidType;
+import java.util.Set;
+
/**
* The unique instance of the class {@code VoidTypeImpl} implements the type {@code void}.
*
@@ -50,26 +52,27 @@ public class VoidTypeImpl extends TypeImpl implements VoidType {
}
@Override
- public boolean isMoreSpecificThan(Type type, boolean withDynamic) {
- return isSubtypeOf(type);
+ public boolean isVoid() {
+ return true;
}
@Override
- public boolean isSubtypeOf(Type type) {
- // The only subtype relations that pertain to void are therefore:
- // void <: void (by reflexivity)
- // bottom <: void (as bottom is a subtype of all types).
- // void <: dynamic (as dynamic is a supertype of all types)
- return type == this || type == DynamicTypeImpl.getInstance();
+ public VoidTypeImpl substitute(Type[] argumentTypes, Type[] parameterTypes) {
+ return this;
}
@Override
- public boolean isVoid() {
- return true;
+ protected boolean internalIsMoreSpecificThan(Type type, boolean withDynamic,
+ Set<TypePair> visitedTypePairs) {
+ return isSubtypeOf(type);
}
@Override
- public VoidTypeImpl substitute(Type[] argumentTypes, Type[] parameterTypes) {
- return this;
+ protected boolean internalIsSubtypeOf(Type type, Set<TypePair> visitedTypePairs) {
+ // The only subtype relations that pertain to void are therefore:
+ // void <: void (by reflexivity)
+ // bottom <: void (as bottom is a subtype of all types).
+ // void <: dynamic (as dynamic is a supertype of all types)
+ return type == this || type == DynamicTypeImpl.getInstance();
}
}

Powered by Google App Engine
This is Rietveld 408576698