summaryrefslogtreecommitdiff
path: root/test/files/pos/t6624.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2012-11-25 13:31:52 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2012-11-25 13:31:52 -0800
commitb8f06f33a420cf07f980cab61b2a11df6a0f5dca (patch)
tree939c690f926c712c68eff3f04c1f6c34bbea6bfc /test/files/pos/t6624.scala
parent8630176e985c5a8266d3afe4c4e3fb50d449630d (diff)
parentfaa6cfcf404b4d172f20b3ed01ba3bd59427b700 (diff)
downloadscala-b8f06f33a420cf07f980cab61b2a11df6a0f5dca.tar.gz
scala-b8f06f33a420cf07f980cab61b2a11df6a0f5dca.tar.bz2
scala-b8f06f33a420cf07f980cab61b2a11df6a0f5dca.zip
Merge pull request #1663 from paulp/merge-2.10.wip-x
Merge 2.10.0-wip into 2.10.x.
Diffstat (limited to 'test/files/pos/t6624.scala')
-rw-r--r--test/files/pos/t6624.scala28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/files/pos/t6624.scala b/test/files/pos/t6624.scala
new file mode 100644
index 0000000000..1a92b92d53
--- /dev/null
+++ b/test/files/pos/t6624.scala
@@ -0,0 +1,28 @@
+sealed trait KList[+M[_]]
+
+case class KCons[M[_], +T <: KList[M]](
+ tail: T
+) extends KList[M]
+
+case class KNil[M[_]]() extends KList[M]
+
+object Test {
+ val klist: KCons[Option, KCons[Option, KCons[Option, KNil[Nothing]]]] = ???
+
+ // crashes with
+ // "Exception in thread "main" scala.reflect.internal.Types$TypeError: value _1 is not a member
+ // of KCons[Option,KCons[Option,KNil[Nothing]]]"
+ klist match {
+ case KCons(KCons(KCons(_))) =>
+ }
+
+ // fails with a similar message as an error, rather than a crash.
+ klist match {
+ case KCons(KCons(_)) =>
+ }
+
+ // succeeds
+ klist match {
+ case KCons(_) =>
+ }
+} \ No newline at end of file