diff options
Diffstat (limited to 'test/files/run/t5568.scala')
-rw-r--r-- | test/files/run/t5568.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t5568.scala b/test/files/run/t5568.scala new file mode 100644 index 0000000000..14599d9ed2 --- /dev/null +++ b/test/files/run/t5568.scala @@ -0,0 +1,16 @@ +object Test { + def main(args: Array[String]): Unit = { + // these should give unboxed results + println(().getClass) + println(5.getClass) + // these should give boxed results + println(().asInstanceOf[AnyRef with Unit].getClass) + println(().asInstanceOf[Unit with AnyRef].getClass) + println(5.asInstanceOf[AnyRef with Int].getClass) + println(5.asInstanceOf[Int with AnyRef].getClass) + //make sure ## wasn't broken + println(5.##) + println((5.asInstanceOf[AnyRef]).##) + println((5:Any).##) + } +} |