ceylon / ceylon-spec

DEPRECATED
Apache License 2.0
108 stars 34 forks source link

Type problem with natives #1372

Closed davidfestal closed 9 years ago

davidfestal commented 9 years ago

the following code :

shared native class C() {
    shared native C returnMe();
}

shared native("jvm") class C() {
    shared native("jvm") C returnMe() => nothing;
}

produces the following error on the jvm overload of returnMe() : Native implementation must have the same return type as native header: returnMe in C must have the type C

Since both types contain declarations that are seen non-equal, they are seen non-equal.

This produces many subtyping-algorithm errors

quintesse commented 9 years ago

Also, @gavinking wrote:

oh because the Declaration are non-equal I hate that I tried to ask Tako to change that, so they were equal

quintesse commented 9 years ago

Done

quintesse commented 9 years ago

Btw @davidfestal , this might have repercussions for the IDE, you might need to check that.