MCPcopy Create free account
hub / github.com/chibash/stone / assertSubtypeOf

Method assertSubtypeOf

src/chap14/TypeInfo.java:25–31  ·  view source on GitHub ↗
(TypeInfo type, TypeEnv env, ASTree where)

Source from the content-addressed store, hash-verified

23 return type() == superType || superType == ANY;
24 }
25 public void assertSubtypeOf(TypeInfo type, TypeEnv env, ASTree where)
26 throws TypeException
27 {
28 if (!subtypeOf(type))
29 throw new TypeException("type mismatch: cannot convert from "
30 + this + " to " + type, where);
31 }
32 public TypeInfo union(TypeInfo right, TypeEnv tenv) {
33 if (match(right))
34 return type();

Callers 8

typeCheckMethod · 0.95
typeCheckMethod · 0.95
typeCheckMethod · 0.95
typeCheckMethod · 0.95
typeCheckMethod · 0.95
typeCheckForAssignMethod · 0.45
typeCheckMethod · 0.45
typeCheckMethod · 0.45

Calls 1

subtypeOfMethod · 0.95

Tested by

no test coverage detected