From bba3b00cf737528de9dcb4823806d6928a00474e Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 19 Dec 2011 22:37:58 -0800 Subject: Fix for classOf NPE. Let type parameter be inferred. Closes SI-4871. --- test/files/run/t4871.check | 2 ++ test/files/run/t4871.scala | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/files/run/t4871.check create mode 100644 test/files/run/t4871.scala (limited to 'test') 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) + } +} -- cgit v1.2.3