diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2008-05-17 15:04:41 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2008-05-17 15:04:41 +0000 |
commit | 3e58057fd1dd2149b5c63ad053986948fe2da691 (patch) | |
tree | d06b65f4fe78ad7d65bea46043781187a462bc6d /test/files/run | |
parent | 154a80dda6a853e25ac7a01e7a13552a3b32ee41 (diff) | |
download | scala-3e58057fd1dd2149b5c63ad053986948fe2da691.tar.gz scala-3e58057fd1dd2149b5c63ad053986948fe2da691.tar.bz2 scala-3e58057fd1dd2149b5c63ad053986948fe2da691.zip |
Fixed classOf problems (issues #841, #876).
Updated manifests.check to reflect the new way 'void' is represented.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/classof.check | 23 | ||||
-rwxr-xr-x | test/files/run/classof.scala | 26 |
2 files changed, 47 insertions, 2 deletions
diff --git a/test/files/run/classof.check b/test/files/run/classof.check index e9a8fd6b76..af7082f5b8 100644 --- a/test/files/run/classof.check +++ b/test/files/run/classof.check @@ -1 +1,22 @@ -SomeClass +Value types: +void +boolean +byte +short +char +int +long +float +double +Class types +class SomeClass +class scala.List +class scala.Tuple2 +Arrays: +class [Lscala.runtime.BoxedUnit; +class [I +class [D +class [Lscala.List; +Functions: +interface scala.Function2 +interface scala.Function1 diff --git a/test/files/run/classof.scala b/test/files/run/classof.scala index 5c920d797f..b50facc1e9 100755 --- a/test/files/run/classof.scala +++ b/test/files/run/classof.scala @@ -3,6 +3,30 @@ class SomeClass object Test { def main(args: Array[String]): Unit = { val cls: Predef.Class[SomeClass] = classOf[SomeClass] - Console.println(cls.getName()) + println("Value types:") + println(classOf[Unit]) + println(classOf[Boolean]) + println(classOf[Byte]) + println(classOf[Short]) + println(classOf[Char]) + println(classOf[Int]) + println(classOf[Long]) + println(classOf[Float]) + println(classOf[Double]) + + println("Class types") + println(classOf[SomeClass]) + println(classOf[List[Array[Float]]]) + println(classOf[(String, Map[Int, String])]) + + println("Arrays:") + println(classOf[Array[Unit]]) + println(classOf[Array[Int]]) + println(classOf[Array[Double]]) + println(classOf[Array[List[String]]]) + + println("Functions: ") + println(classOf[(Int, Int) => Unit]) + println(classOf[Int => Boolean]) } } |