summaryrefslogtreecommitdiff
path: root/test/files/pos/bug4305.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-19 18:12:17 +0000
committerPaul Phillips <paulp@improving.org>2011-03-19 18:12:17 +0000
commit4b0531b55a8d4971b7e297413e514072a99385e7 (patch)
treee25ad72c4d7b7f06b55be1ab8487ebda27ab2c41 /test/files/pos/bug4305.scala
parent4380911a32eb7fa99faf5fea4ba5f9ad6a3a5258 (diff)
downloadscala-4b0531b55a8d4971b7e297413e514072a99385e7.tar.gz
scala-4b0531b55a8d4971b7e297413e514072a99385e7.tar.bz2
scala-4b0531b55a8d4971b7e297413e514072a99385e7.zip
Fix for crasher with Class objects.
extempore. References #4305, no review.
Diffstat (limited to 'test/files/pos/bug4305.scala')
-rw-r--r--test/files/pos/bug4305.scala31
1 files changed, 31 insertions, 0 deletions
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