diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-01-18 11:52:45 -0800 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-01-18 11:52:45 -0800 |
commit | 6f72ed85c3882d2a8c824a41e6e42d7f33b8d1d6 (patch) | |
tree | 283c3f0a57d4820f97c1316159c004be7d009e0c /test/files/run | |
parent | 1a63cf8b9b48c98fa754a1eb6dcfe35220016c74 (diff) | |
parent | c6065591c981e38aedf50618faee945a8b1e5423 (diff) | |
download | scala-6f72ed85c3882d2a8c824a41e6e42d7f33b8d1d6.tar.gz scala-6f72ed85c3882d2a8c824a41e6e42d7f33b8d1d6.tar.bz2 scala-6f72ed85c3882d2a8c824a41e6e42d7f33b8d1d6.zip |
Merge pull request #1904 from JamesIry/SI-5568_2.10.x
SI-5568 Fixes verify error from getClass on refinement of value type
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t5568.check | 9 | ||||
-rw-r--r-- | test/files/run/t5568.scala | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/files/run/t5568.check b/test/files/run/t5568.check new file mode 100644 index 0000000000..67aaf16e07 --- /dev/null +++ b/test/files/run/t5568.check @@ -0,0 +1,9 @@ +void +int +class scala.runtime.BoxedUnit +class scala.runtime.BoxedUnit +class java.lang.Integer +class java.lang.Integer +5 +5 +5 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).##) + } +} |