eclipse-archived / ceylon

The Ceylon compiler, language module, and command line tools
http://ceylon-lang.org
Apache License 2.0
399 stars 62 forks source link

Trying to retrieve late attribute metamodel with `Set` type argument causes IncompatibleTypeException #7443

Open fill0llif opened 5 years ago

fill0llif commented 5 years ago

Trying to retrieve late attribute metamodel with Set type argument causes IncompatibleTypeException.

shared class Type() {
    shared late String attr;
}
shared void run() {
    assert (exists attr = `Type`.getAttribute<Type, String, String>("attr"));
}

The exception:

ceylon.language.meta.model.IncompatibleTypeException "Incompatible type: actual type of applied declaration is Attribute<Type,String,Nothing> is not compatible with expected type: Attribute<Type,String,String>. Try passing the type argument explicitly with: memberApply<Type,String,Nothing>()"

As @Zambonifofex already pointed out, on the Web IDE this is working fine.