ceylon / ceylon-spec

DEPRECATED
Apache License 2.0
108 stars 34 forks source link

use of natively-imported module in non-native function #1454

Closed gavinking closed 8 years ago

gavinking commented 8 years ago

I have, in a x-platform module:

module hello "1.0.0" {
    native("js") import ceylon.collection "1.2.0";
}

And then:

import ceylon.collection {
    ArrayList
}
shared void run() {
    print(ArrayList { [1,2], [3,4] });
}

I should get an error on the usage of ArrayList but I don't.

@quintesse?

quintesse commented 8 years ago

The CLI compilers handle this just fine. It's an IDE-only problem again related to the fact that it uses the JVM model loader for JS , nothing we can do anything about at this time. Moving to 1.3.

This is something that will have to be fixed in cooperation with @davidfestal

quintesse commented 8 years ago

Hmm wait, let me investigate a bit more, perhaps there's a way to catch this.

quintesse commented 8 years ago

Ok, should be fixed now although I haven't tested it in the IDE yet.