error calling `type().string` on a ClassWithInitializerDeclaration
jvasileff opened this issue · 0 comments
jvasileff commented
shared class OC() {}
shared void run() {
ClassWithInitializerDeclaration ocDec = `class OC`;
value t = type(ocDec).string;
}
results in
ceylon run: Error while loading the ceylon.language/1.2.0 module:
Error while resolving type of method 'constructorDeclarations' for com.redhat.
ceylon.compiler.java.runtime.metamodel.decl::
ClassWithInitializerDeclarationImpl:
Could not find type 'ceylon.language.ConstructorDeclaration'
com.redhat.ceylon.model.loader.ModelResolutionException: Error while loading the ceylon.language/1.2.0 module:
Error while resolving type of method 'constructorDeclarations' for com.redhat.ceylon.compiler.java.runtime.metamodel.decl::ClassWithInitializerDeclarationImpl:
Could not find type 'ceylon.language.ConstructorDeclaration'
at com.redhat.ceylon.compiler.java.runtime.model.RuntimeModelLoader$1.reportError(RuntimeModelLoader.java:209)
at com.redhat.ceylon.model.typechecker.model.UnknownType.reportErrors(UnknownType.java:94)
at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getMetamodel(Metamodel.java:595)
at com.redhat.ceylon.compiler.java.runtime.metamodel.decl.FunctionDeclarationImpl.<init>(FunctionDeclarationImpl.java:64)
at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getOrCreateMetamodel(Metamodel.java:417)
at com.redhat.ceylon.compiler.java.runtime.metamodel.decl.ClassOrInterfaceDeclarationImpl.addDeclarationTo(ClassOrInterfaceDeclarationImpl.java:114)
at com.redhat.ceylon.compiler.java.runtime.metamodel.decl.ClassOrInterfaceDeclarationImpl.init(ClassOrInterfaceDeclarationImpl.java:99)
at com.redhat.ceylon.compiler.java.runtime.metamodel.decl.ClassDeclarationImpl.init(ClassDeclarationImpl.java:58)
at com.redhat.ceylon.compiler.java.runtime.metamodel.decl.ClassOrInterfaceDeclarationImpl.checkInit(ClassOrInterfaceDeclarationImpl.java:163)
at com.redhat.ceylon.compiler.java.runtime.metamodel.decl.ClassOrInterfaceDeclarationImpl.getTypeParameterDeclarations(ClassOrInterfaceDeclarationImpl.java:349)
at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.getTypeArguments(Metamodel.java:1419)
at com.redhat.ceylon.compiler.java.runtime.metamodel.meta.ClassOrInterfaceImpl.init(ClassOrInterfaceImpl.java:93)
at com.redhat.ceylon.compiler.java.runtime.metamodel.meta.ClassOrInterfaceImpl.checkInit(ClassOrInterfaceImpl.java:83)
at com.redhat.ceylon.compiler.java.runtime.metamodel.meta.ClassOrInterfaceImpl.getTypeArgumentWithVariances(ClassOrInterfaceImpl.java:130)
at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.toTypeString(Metamodel.java:1562)
at com.redhat.ceylon.compiler.java.runtime.metamodel.meta.ClassOrInterfaceImpl.toString(ClassOrInterfaceImpl.java:1168)
at simple.run_.run(run.ceylon:76)