Method
assertSubtypeOf
(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(); |
Tested by
no test coverage detected