ceylon / ceylon-spec

DEPRECATED
Apache License 2.0
108 stars 34 forks source link

problem with members of native classes #1432

Closed gavinking closed 9 years ago

gavinking commented 9 years ago

The typechecker accepts this:

shared native class Elephant() {
    shared String name = "Trompon";
}

shared native("jvm") class Elephant() {
    shared String name = "Trompon";
}

And even this:

shared native class Elephant() {
    shared native String name = "Trompon";
}

shared native("jvm") class Elephant() {
    shared String name = "Trompon";
}

But it doesn't accept this:

shared native class Elephant() {
    shared native String name;
}

shared native("jvm") class Elephant() {
    shared String name = "Trompon";
}

That can't be right.

@quintesse would you take a look, please.

quintesse commented 9 years ago

All these examples are now properly rejected.

gavinking commented 9 years ago

Good, thanks.