summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-12-03 23:47:23 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-12-03 23:47:23 -0800
commit2d87057cde5fa734a0e0935be74a315479469a90 (patch)
tree567826132248059fe1575a6930443d9444e3c154 /test/files
parent6c63ab153651f7946ece5740d52e0f2b701e349d (diff)
parentd0aaa86a9fe20e00f0cfa4fd1154126579933fb7 (diff)
downloadscala-2d87057cde5fa734a0e0935be74a315479469a90.tar.gz
scala-2d87057cde5fa734a0e0935be74a315479469a90.tar.bz2
scala-2d87057cde5fa734a0e0935be74a315479469a90.zip
Merge pull request #3212 from retronym/ticket/8023
SI-8023 Fix symbol-completion-order bug of type var patterns
Diffstat (limited to 'test/files')
-rw-r--r--test/files/pos/t8023.scala22
-rw-r--r--test/files/pos/t8023b.scala2
2 files changed, 24 insertions, 0 deletions
diff --git a/test/files/pos/t8023.scala b/test/files/pos/t8023.scala
new file mode 100644
index 0000000000..86824084ed
--- /dev/null
+++ b/test/files/pos/t8023.scala
@@ -0,0 +1,22 @@
+import language._
+
+
+object Test {
+ def foo = (null: Any) match {
+ case a: A[k] =>
+ // error: kinds of the type arguments (k) do not conform to the
+ // expected kinds of the type parameters (type K) in class B.
+ new B[k]()
+ }
+}
+
+class A[K[L[_]]]
+
+class B[K[M[_]]]
+
+
+object Test2 {
+ def foo = (null: Any) match {
+ case a: A[k] => new B[k]() // this one worked before as the info of `A` was complete
+ }
+}
diff --git a/test/files/pos/t8023b.scala b/test/files/pos/t8023b.scala
new file mode 100644
index 0000000000..94c9b2f8d2
--- /dev/null
+++ b/test/files/pos/t8023b.scala
@@ -0,0 +1,2 @@
+// this fails with naive attempts to fix SI-8023
+trait T[A <: T[A]]