diff options
author | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-08-30 17:32:09 -0700 |
---|---|---|
committer | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-08-30 17:32:09 -0700 |
commit | 78401c8220fb56ed077b99a5ffb4205c14fee736 (patch) | |
tree | 6e29d7c50c273f789070a3b08fe30bbdb4ccff58 /test/files/run | |
parent | ffe5f56eb500ed4dd856087864d8d3313eace931 (diff) | |
parent | 30eac476d054c50408a860f1574dcf92c7378e4a (diff) | |
download | scala-78401c8220fb56ed077b99a5ffb4205c14fee736.tar.gz scala-78401c8220fb56ed077b99a5ffb4205c14fee736.tar.bz2 scala-78401c8220fb56ed077b99a5ffb4205c14fee736.zip |
Merge pull request #1213 from paulp/topic/anyval
Expanded the reach of value classes.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/richWrapperEquals.scala | 4 | ||||
-rw-r--r-- | test/files/run/t5356.check | 8 | ||||
-rw-r--r-- | test/files/run/t5356.scala | 6 |
3 files changed, 7 insertions, 11 deletions
diff --git a/test/files/run/richWrapperEquals.scala b/test/files/run/richWrapperEquals.scala index 44beb133b3..4a43617cde 100644 --- a/test/files/run/richWrapperEquals.scala +++ b/test/files/run/richWrapperEquals.scala @@ -1,10 +1,6 @@ object Test { def main(args: Array[String]): Unit = { - assert(intWrapper(5) == 5) - assert(5 == intWrapper(5)) assert(5 == (5: java.lang.Integer)) assert((5: java.lang.Integer) == 5) - assert((5: java.lang.Integer) == intWrapper(5)) - assert(intWrapper(5) == (5: java.lang.Integer)) } } diff --git a/test/files/run/t5356.check b/test/files/run/t5356.check index 21c4aef07b..7522e7ea74 100644 --- a/test/files/run/t5356.check +++ b/test/files/run/t5356.check @@ -1,6 +1,6 @@ -1 scala.runtime.RichInt -1 scala.runtime.RichInt +1 java.lang.Integer +1 java.lang.Integer 1 scala.math.BigInt -1 scala.runtime.RichDouble -1 scala.runtime.RichFloat +1 java.lang.Double +1 java.lang.Float 1 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) } } |