summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/bug1106.check7
-rw-r--r--test/files/neg/bug1106.scala5
-rw-r--r--test/files/pos/bug1136.check2
-rw-r--r--test/files/pos/bug1136.scala8
4 files changed, 22 insertions, 0 deletions
diff --git a/test/files/neg/bug1106.check b/test/files/neg/bug1106.check
new file mode 100644
index 0000000000..3fa595abf1
--- /dev/null
+++ b/test/files/neg/bug1106.check
@@ -0,0 +1,7 @@
+bug1106.scala:2: error: expected class or object definition
+val p = new Par[String]
+^
+bug1106.scala:5: error: expected class or object definition
+new Foo[p.type](p) // crashes compiler
+^
+two errors found
diff --git a/test/files/neg/bug1106.scala b/test/files/neg/bug1106.scala
new file mode 100644
index 0000000000..36b5a0ec8f
--- /dev/null
+++ b/test/files/neg/bug1106.scala
@@ -0,0 +1,5 @@
+class Par[S]
+val p = new Par[String]
+class Foo[T[x]<:Par[x]](t: T[String])
+
+new Foo[p.type](p) // crashes compiler \ No newline at end of file
diff --git a/test/files/pos/bug1136.check b/test/files/pos/bug1136.check
new file mode 100644
index 0000000000..0747cddefb
--- /dev/null
+++ b/test/files/pos/bug1136.check
@@ -0,0 +1,2 @@
+warning: there were unchecked warnings; re-run with -unchecked for details
+one warning found
diff --git a/test/files/pos/bug1136.scala b/test/files/pos/bug1136.scala
new file mode 100644
index 0000000000..fcceaf5473
--- /dev/null
+++ b/test/files/pos/bug1136.scala
@@ -0,0 +1,8 @@
+object test {
+ def foo(s: Int*): Unit = {
+ s.toList match {
+ case t: List[Int] => foo(t: _*)
+ case _ =>
+ }
+ }
+}