diff options
author | Paul Phillips <paulp@improving.org> | 2011-12-19 22:37:58 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-12-19 23:22:35 -0800 |
commit | bba3b00cf737528de9dcb4823806d6928a00474e (patch) | |
tree | cc1c6db76a3c72d22bb0dd5b10ac4921bdeb08b0 /test/files | |
parent | 6226468fdf81d46f005b97fb49c4ec08c856ea3f (diff) | |
download | scala-bba3b00cf737528de9dcb4823806d6928a00474e.tar.gz scala-bba3b00cf737528de9dcb4823806d6928a00474e.tar.bz2 scala-bba3b00cf737528de9dcb4823806d6928a00474e.zip |
Fix for classOf NPE.
Let type parameter be inferred. Closes SI-4871.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t4871.check | 2 | ||||
-rw-r--r-- | test/files/run/t4871.scala | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t4871.check b/test/files/run/t4871.check new file mode 100644 index 0000000000..a60526a0f3 --- /dev/null +++ b/test/files/run/t4871.check @@ -0,0 +1,2 @@ +class Test$C +class Test$D diff --git a/test/files/run/t4871.scala b/test/files/run/t4871.scala new file mode 100644 index 0000000000..70d8b7145c --- /dev/null +++ b/test/files/run/t4871.scala @@ -0,0 +1,12 @@ +object Test { + class C + class D + + def main(args: Array[String]): Unit = { + val z: Class[C] = classOf + val z2: Class[D] = classOf[D] + + println(z) + println(z2) + } +} |