…t 'refs/pull/392/head'; commit 'refs/pull/397/head' into develop
A total rewrite of "runtimeClass", discarding the user-space approach in favor of simply fixing getClass. def f1 = 5.getClass // Class[Int] def f2 = (5: AnyVal).getClass // Class[_ <: AnyVal] def f3 = (5: java.lang.Integer).getClass // Class[_ <: java.lang.Integer] class A class B extends A def f1 = (new B: Any).getClass().newInstance() // Any def f2 = (new B: AnyRef).getClass().newInstance() // AnyRef def f3 = (new B: A).getClass().newInstance() // A def f4 = (new B: B).getClass().newInstance() // B But that's not all! def f0[T >: B] = (new B: T).getClass().newInstance() def f5 = f0[Any] // Any def f6 = f0[AnyRef] // AnyRef def f7 = f0[A] // A def f8 = f0[B] // B Closes #490, #896, #4696. Review by moors. (Note: I think this is pretty good, but picky review requested.)
A less ad hoc infrastructure for generating AnyVal sources. A few more comments on said sources. No review.
Addresses the issues swirling around Double.Epsilon and friends which were battled out in more than one venue and then aptly summarized by retronym in #3791. Thanks to Simon Ochsenreither for submitting a patch; I wasn't able to use too much of it because the source code for these types is generated, but effort is always appreciated. Closes #3791, and I'm tired and I'd hate to blow this one at this late date: review by rytz.
The AnyVal types become source files instead of polite compiler fictions. !! You'll need a serious "ant all.clean" now. !! As of this commit the system is fully bootstrapped and the synthetic code eliminated: only the source files remain. The sort-of-AnyVal-companions in scala.runtime.* have all been eliminated because the actual companions can do everything; deprecated vals in the scala.runtime package object point to the companions. This left AnyValCompanion as the only AnyVal related thing in the runtime package: that made little sense, so I deprecated and moved it as well. Starr is based on r24066 plus this commit. Closes #4121. Review by rytz, odersky.