From d3f879a6b0165310bb756b811ea3f97685533948 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 29 Aug 2012 08:25:26 -0700 Subject: Expanded the reach of value classes. Now extending AnyVal: - RichInt, RichDouble, etc. - ArrayOps.ofRef, ofBoolean, etc - StringAdd - StringFormat The rest of it is the changes necessary to enable those. --- test/files/run/t5356.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/files/run/t5356.scala') diff --git a/test/files/run/t5356.scala b/test/files/run/t5356.scala index f7696c6088..ec17e036ad 100644 --- a/test/files/run/t5356.scala +++ b/test/files/run/t5356.scala @@ -1,12 +1,12 @@ object Test { - def f(x: { def toInt: Int }) = println(x.toInt + " " + x.getClass.getName) - + def f(x: Any { def toInt: Int }) = println(x.toInt + " " + x.getClass.getName) + def main(args: Array[String]): Unit = { f(1) f(1.toInt) f(BigInt(1)) f(1d) f(1f) - println((1: { def toInt: Int }).toInt) + println((1: (Any { def toInt: Int })).toInt) } } -- cgit v1.2.3