Search in sources :

Example 56 with Interface

use of com.redhat.ceylon.model.typechecker.model.Interface in project ceylon-compiler by ceylon.

the class TypeParserTests method testEmptyAbbrev.

@Test
public void testEmptyAbbrev() {
    Type type = new TypeParser(MockLoader.instance).decodeType("[]", null, mockDefaultModule, mockPkgUnit);
    Assert.assertNotNull(type);
    TypeDeclaration declaration = type.getDeclaration();
    Assert.assertNotNull(declaration);
    Assert.assertTrue(declaration instanceof Interface);
    Assert.assertEquals("ceylon.language::Empty", declaration.getQualifiedNameString());
    Assert.assertNull(type.getQualifyingType());
}
Also used : IntersectionType(com.redhat.ceylon.model.typechecker.model.IntersectionType) Type(com.redhat.ceylon.model.typechecker.model.Type) UnionType(com.redhat.ceylon.model.typechecker.model.UnionType) TypeParser(com.redhat.ceylon.model.loader.TypeParser) TypeDeclaration(com.redhat.ceylon.model.typechecker.model.TypeDeclaration) Interface(com.redhat.ceylon.model.typechecker.model.Interface) ClassOrInterface(com.redhat.ceylon.model.typechecker.model.ClassOrInterface) Test(org.junit.Test)

Aggregations

Interface (com.redhat.ceylon.model.typechecker.model.Interface)56 ClassOrInterface (com.redhat.ceylon.model.typechecker.model.ClassOrInterface)53 TypeDeclaration (com.redhat.ceylon.model.typechecker.model.TypeDeclaration)35 Type (com.redhat.ceylon.model.typechecker.model.Type)30 TypedDeclaration (com.redhat.ceylon.model.typechecker.model.TypedDeclaration)21 Declaration (com.redhat.ceylon.model.typechecker.model.Declaration)20 Tree (com.redhat.ceylon.compiler.typechecker.tree.Tree)18 JCTree (com.sun.tools.javac.tree.JCTree)18 Class (com.redhat.ceylon.model.typechecker.model.Class)17 JCExpression (com.sun.tools.javac.tree.JCTree.JCExpression)17 LazyInterface (com.redhat.ceylon.model.loader.model.LazyInterface)14 JCNewClass (com.sun.tools.javac.tree.JCTree.JCNewClass)12 Scope (com.redhat.ceylon.model.typechecker.model.Scope)10 TypeParameter (com.redhat.ceylon.model.typechecker.model.TypeParameter)10 Function (com.redhat.ceylon.model.typechecker.model.Function)9 Value (com.redhat.ceylon.model.typechecker.model.Value)9 TypeParser (com.redhat.ceylon.model.loader.TypeParser)8 Constructor (com.redhat.ceylon.model.typechecker.model.Constructor)8 FunctionOrValue (com.redhat.ceylon.model.typechecker.model.FunctionOrValue)8 IntersectionType (com.redhat.ceylon.model.typechecker.model.IntersectionType)8