diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-04 14:36:14 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-04 17:36:31 -0800 |
commit | c6a783ac089d8cf5a60a98946af5e80aff5a7d32 (patch) | |
tree | 2f081bad580c0fcb45b2a0ecb0e4bcc225879bbb /src/library | |
parent | 513710c5277ef8870ba3f5c7c9bebe40068ce4af (diff) | |
download | scala-c6a783ac089d8cf5a60a98946af5e80aff5a7d32.tar.gz scala-c6a783ac089d8cf5a60a98946af5e80aff5a7d32.tar.bz2 scala-c6a783ac089d8cf5a60a98946af5e80aff5a7d32.zip |
Making AnyVal into a class instead of a trait.
-- traits can extend Any, AnyRef, or AnyVal
-- classes can extend AnyRef or AnyVal but not Any.
This breaks reflection for the moment as it smuggles AnyVal so far
downstream that it's reflecting its way into bytecode (or something)
but the following test case goes five for six as anticipated.
trait Foo1 extends Any
trait Foo2 extends AnyVal
trait Foo3 extends AnyRef
class Bar1 extends Any // fail
@inline class Bar2 extends AnyVal
class Bar3 extends AnyRef
Eliminated various hijinx from definitions.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/AnyVal.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/AnyVal.scala b/src/library/scala/AnyVal.scala index daad6f6f5e..393f0899f4 100644 --- a/src/library/scala/AnyVal.scala +++ b/src/library/scala/AnyVal.scala @@ -25,7 +25,7 @@ package scala * The ''integer types'' include the subrange types as well as [[scala.Int]] and [[scala.Long]]. * The ''floating point types'' are [[scala.Float]] and [[scala.Double]]. */ -trait AnyVal extends Any with NotNull { +abstract class AnyVal extends Any with NotNull { // disabled for now to make the standard build go through. // Once we have a new strap we can uncomment this and delete the AnyVal_getClass entry in Definitions. def getClass(): Class[_ <: AnyVal] = ??? |