Search in sources :

Example 1 with UnionClassType

use of org.eclipse.ceylon.langtools.tools.javac.code.Type.UnionClassType in project ceylon by eclipse.

the class JavacTrees method getLub.

public TypeMirror getLub(CatchTree tree) {
    JCCatch ct = (JCCatch) tree;
    JCVariableDecl v = ct.param;
    if (v.type != null && v.type.getKind() == TypeKind.UNION) {
        UnionClassType ut = (UnionClassType) v.type;
        return ut.getLub();
    } else {
        return v.type;
    }
}
Also used : UnionClassType(org.eclipse.ceylon.langtools.tools.javac.code.Type.UnionClassType) JCCatch(org.eclipse.ceylon.langtools.tools.javac.tree.JCTree.JCCatch) JCVariableDecl(org.eclipse.ceylon.langtools.tools.javac.tree.JCTree.JCVariableDecl)

Aggregations

UnionClassType (org.eclipse.ceylon.langtools.tools.javac.code.Type.UnionClassType)1 JCCatch (org.eclipse.ceylon.langtools.tools.javac.tree.JCTree.JCCatch)1 JCVariableDecl (org.eclipse.ceylon.langtools.tools.javac.tree.JCTree.JCVariableDecl)1