diff options
author | Laurent Le Brun <laurentlb@google.com> | 2015-05-18 20:41:21 +0000 |
---|---|---|
committer | Lukacs Berki <lberki@google.com> | 2015-05-19 09:31:45 +0000 |
commit | 158bd1f681aa61153a9154f6ac65914dc89815e0 (patch) | |
tree | f30b94c108ae11a264d585a1d9f579bc815a9e11 /src/main/java/com/google/devtools/build/lib/syntax | |
parent | 29e46b23143eaeeda1d43e72d0a69131490e6bde (diff) |
Remove dead code
--
MOS_MIGRATED_REVID=93920816
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java index cdbfebdd4b..23275eff39 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java @@ -33,7 +33,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; import javax.annotation.Nullable; @@ -529,10 +528,6 @@ public abstract class SkylarkType { return value instanceof BaseFunction; } - public static SkylarkFunctionType of(String name) { - return SkylarkFunctionType.of(name, TOP); - } - public static SkylarkFunctionType of(String name, SkylarkType returnType) { return new SkylarkFunctionType(name, returnType); } @@ -545,17 +540,6 @@ public abstract class SkylarkType { // Utility functions regarding types - /** - * For the purpose of type inference during validation, - * we upgrade the type for None as being Top, the type of everything, - * so None is compatible with anything as far as the validate method is concern. - * - * @param type a SkylarkType suitable for runtime type checking. - * @return the corresponding SkylarkType suitable for a type validation. - */ - public static SkylarkType typeForInference(SkylarkType type) { - return type == NONE ? TOP : type; - } public static SkylarkType typeOf(Object value) { if (value == null) { @@ -579,28 +563,6 @@ public abstract class SkylarkType { } } - boolean isStruct() { - return ClassObject.class.isAssignableFrom(getType()); - } - - boolean isList() { - return SkylarkList.class.isAssignableFrom(getType()); - } - - boolean isDict() { - return Map.class.isAssignableFrom(getType()); - } - - boolean isSet() { - return Set.class.isAssignableFrom(getType()); - } - - boolean isNset() { - // TODO(bazel-team): NestedSets are going to be a bit strange with 2 type info (validation - // and execution time). That can be cleaned up once we have complete type inference. - return SkylarkNestedSet.class.isAssignableFrom(getType()); - } - private static boolean isTypeAllowedInSkylark(Object object) { if (object instanceof NestedSet<?>) { return false; |