From 817da386e456be422861ac6e974838e6eb6db836 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 2 Nov 2012 13:10:54 -0700 Subject: Fix for SI-6600, regression with ScalaNumber. Not much in the end; I divided ScalaNumericConversions into two traits such that the ScalaNumericAnyConversions can be used in value classes, and ScalaNumericConversions can override methods in ScalaNumber (since one trait cannot do both those things.) The fact that ScalaNumber is privileged for equality but a) extends java.lang.Number and therefore b) cannot be a value class is something we will want to revisit real soon. --- test/files/pos/t6600.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/files/pos/t6600.scala (limited to 'test') diff --git a/test/files/pos/t6600.scala b/test/files/pos/t6600.scala new file mode 100644 index 0000000000..1e8137894c --- /dev/null +++ b/test/files/pos/t6600.scala @@ -0,0 +1,8 @@ +final class Natural extends scala.math.ScalaNumber with scala.math.ScalaNumericConversions { + def intValue(): Int = 0 + def longValue(): Long = 0L + def floatValue(): Float = 0.0F + def doubleValue(): Double = 0.0D + def isWhole(): Boolean = false + def underlying() = this +} -- cgit v1.2.3