Closed sjrd closed 6 years ago
Ready for review, mainly @gzm0.
@densh It would be good if you could have a look as well, mostly to tell us whether any of it is unreasonable for Scala Native. But from our earlier discussions, it should be fine.
Updated with fixes to make the CI pass on 2.10 and 2.11 (I had misconfigured Travis so I wouldn't actually test with those versions).
And with an additional commit that uses macros on the JVM to get the caller's class loader.
The Scala Native version is not there yet, as Scala Native does not have yet the necessary mechanisms to implement the API.
The only discrepancy between JVM and JS is the behavior of
protected
constructors. The JVM version considers that they are visible, because they are compiled topublic
in the bytecode, while Scala.js explicitly excludes them. It seems that the most reasonable fix would be to allow access to protected constructors in Scala.js' coreReflect
mechanism.