ceylon / ceylon-spec

DEPRECATED
Apache License 2.0
108 stars 34 forks source link

xplatform module with missing native impls #1423

Closed gavinking closed 8 years ago

gavinking commented 8 years ago

I have a project in the IDE that is being compiled for both backends. It has this module:

module nat "1.0.0" {}

In the root package it has this unit:

native
shared void run();

native("jvm")
shared void run() {}

I don't get any error for the missing "js" implementation.

Note that sometimes I get the opposite result: leaving out the "jvm" implementation results in no errors.

@quintesse would you take a look at this please.

quintesse commented 8 years ago

I just tested this and it seems to work just fine here. Let me test some more.

quintesse commented 8 years ago

Ok, reproduced it. Btw, just as a remark, the typechecker itself will not be able to detect this, only the JS compiler itself. This is because the JS backend has this special way of mixing manually written JS files with Ceylon that the typechecker doesn't know anything about.

quintesse commented 8 years ago

Oh just great, the JS compiler doesn't even complain about this code!

quintesse commented 8 years ago

Ok, I can close this now, unfortunately now the problem described in ceylon/ceylon-js#637 is back again. Only I have no idea how. Setting a breakpoint on the code that adds the error shows that each one is only added once.