orc.type
Class MultiType
java.lang.Object
orc.type.Type
orc.type.MultiType
public class MultiType
- extends Type
A composite type supporting ad-hoc polymorphic calls.
Contains a list of types; when this type is used in call position,
it will be typechecked using each type in the list sequentially until
one succeeds.
- Author:
- dkitchin
Methods inherited from class orc.type.Type |
addConstraints, assertSubtype, call, closed, demote, equal, findVariance, freeVars, isBot, isTop, join, makeCallableInstance, meet, promote, subst, substAll, supertype, unwrapAs, variances |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MultiType
public MultiType(java.util.List<Type> alts)
MultiType
public MultiType(Type A,
Type B)
subtype
public boolean subtype(Type that)
- Overrides:
subtype
in class Type
call
public Type call(Env<Type> ctx,
Env<Type> typectx,
java.util.List<Arg> args,
java.util.List<Type> typeActuals)
throws TypeException
- Overrides:
call
in class Type
- Throws:
TypeException
toString
public java.lang.String toString()
- Overrides:
toString
in class Type