This issue was originally called "Native doesn't deal correctly with SpecifierExpressions", with the following description:
See ceylon/ceylon-js#609 for example.
It's because SpecifierExpressions are dealt with before the declaration they belong to, so the system in place to determine the "scope" of a native annotation fails to work.
Discussed with @gavinking to make the backend detection part of the Scope so one can do decl.getScope().getBackend() or something similar.
But in the end it was only used to implement the changes to the backend scoping suggested by Gavin so I changed the title to express the work that was done.
Before this change the detection of backend "scopes" was done by each visitor. They also got passed a backendSupport at construction so we could check what backends were actually supported (a jvm compiler doesn't care about native code for JS).
Now the scopes are handled in Scope itself and the backend support can be retrieved from Unit.
This issue was originally called "Native doesn't deal correctly with SpecifierExpressions", with the following description:
But in the end it was only used to implement the changes to the backend scoping suggested by Gavin so I changed the title to express the work that was done.
Before this change the detection of backend "scopes" was done by each visitor. They also got passed a
backendSupport
at construction so we could check what backends were actually supported (a jvm compiler doesn't care about native code for JS).Now the scopes are handled in
Scope
itself and the backend support can be retrieved fromUnit
.