ceylon / ceylon-runtime

DEPRECATED
24 stars 5 forks source link

Typechecker module not registered in runtime metamodel #41

Closed FroMage closed 10 years ago

FroMage commented 11 years ago

As explained in ceylon/ceylon-compiler#1249, we need the hidden module dependencies of ceylon.language to be registered in the runtime metamodel.

FroMage commented 11 years ago

Not sure how to write a test for this without the language module being available. The test would involve running this module:

run.ceylon:

import ceylon.language.model { Class, modules }
import ceylon.language.model.declaration { ClassDeclaration }

shared class A(){}

void run(){
    assert(exists mod = modules.find("test", "1"));
    assert(exists pkg = mod.findPackage("test"));
    assert(is ClassDeclaration klass = pkg.getClassOrInterface("A"));
    assert(is Class<Anything,[]> model = klass.apply());
    value instance = model();
    // if we get this far with no exception we're good
    print("It works!");
}

module.ceylon:

module test '1' {}
FroMage commented 11 years ago

This is fixed (and verified), but needs a test to be added.

FroMage commented 10 years ago

We've lots of tests now for this.