From 4b0531b55a8d4971b7e297413e514072a99385e7 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 19 Mar 2011 18:12:17 +0000 Subject: Fix for crasher with Class objects. extempore. References #4305, no review. --- test/files/pos/bug4305.scala | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/files/pos/bug4305.scala (limited to 'test/files/pos') diff --git a/test/files/pos/bug4305.scala b/test/files/pos/bug4305.scala new file mode 100644 index 0000000000..ba3eb65bc1 --- /dev/null +++ b/test/files/pos/bug4305.scala @@ -0,0 +1,31 @@ +object T1 { + trait T[A] + class C extends T[String] + object Test { + def main(args: Array[String]): Unit = { + classOf[C].getTypeParameters + } + } +} + +object T2 { + trait T[A] + class C extends T[String] + object Test { + def main(args: Array[String]): Unit = { + val x = classOf[C] + x.getTypeParameters + } + } +} + +object T3 { + trait T[A] + class C extends T[String] + object Test { + def main(args: Array[String]): Unit = { + val x: Class[C] = classOf[C] + x.getTypeParameters + } + } +} \ No newline at end of file -- cgit v1.2.3