Search in sources :

Example 11 with UnionType

use of org.eclipse.ceylon.model.typechecker.model.UnionType in project ceylon by eclipse.

the class ReferenceCounter method visit.

@Override
public void visit(Tree.SimpleType that) {
    super.visit(that);
    TypeDeclaration t = that.getDeclarationModel();
    if (t != null && !(t instanceof UnionType) && !(t instanceof IntersectionType)) {
        referenced(t);
    }
}
Also used : UnionType(org.eclipse.ceylon.model.typechecker.model.UnionType) IntersectionType(org.eclipse.ceylon.model.typechecker.model.IntersectionType) TypeDeclaration(org.eclipse.ceylon.model.typechecker.model.TypeDeclaration)

Aggregations

IntersectionType (org.eclipse.ceylon.model.typechecker.model.IntersectionType)11 UnionType (org.eclipse.ceylon.model.typechecker.model.UnionType)11 Type (org.eclipse.ceylon.model.typechecker.model.Type)9 TypeDeclaration (org.eclipse.ceylon.model.typechecker.model.TypeDeclaration)9 TypeParser (org.eclipse.ceylon.model.loader.TypeParser)6 Test (org.junit.Test)6 ArrayList (java.util.ArrayList)3 Class (org.eclipse.ceylon.model.typechecker.model.Class)3 TypeParameter (org.eclipse.ceylon.model.typechecker.model.TypeParameter)3 UnknownType (org.eclipse.ceylon.model.typechecker.model.UnknownType)3 TypeVisitor.getTupleType (org.eclipse.ceylon.compiler.typechecker.analyzer.TypeVisitor.getTupleType)2 CustomTree (org.eclipse.ceylon.compiler.typechecker.tree.CustomTree)2 Tree (org.eclipse.ceylon.compiler.typechecker.tree.Tree)2 LazyType (org.eclipse.ceylon.model.typechecker.model.LazyType)2 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 CompilerErrorException (org.eclipse.ceylon.compiler.js.CompilerErrorException)1 ClassOrInterface (org.eclipse.ceylon.model.typechecker.model.ClassOrInterface)1 Constructor (org.eclipse.ceylon.model.typechecker.model.Constructor)1