diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-03 23:47:23 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-03 23:47:23 -0800 |
commit | 2d87057cde5fa734a0e0935be74a315479469a90 (patch) | |
tree | 567826132248059fe1575a6930443d9444e3c154 /test | |
parent | 6c63ab153651f7946ece5740d52e0f2b701e349d (diff) | |
parent | d0aaa86a9fe20e00f0cfa4fd1154126579933fb7 (diff) | |
download | scala-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')
-rw-r--r-- | test/files/pos/t8023.scala | 22 | ||||
-rw-r--r-- | test/files/pos/t8023b.scala | 2 |
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]] |