diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-11-25 13:52:36 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-11-25 13:52:36 -0800 |
commit | 9afc00c0408e49a111f381334cbdb7fcdaa4f340 (patch) | |
tree | 9807c35aa0bc818bf487a2c93bd577e37e1adce0 /test/files/pos/t6624.scala | |
parent | 889ceade520ae5d2d1485edf2826696fa91a0e91 (diff) | |
parent | f0e9237834d00ea9e27937e44dc8b8382be32db6 (diff) | |
download | scala-9afc00c0408e49a111f381334cbdb7fcdaa4f340.tar.gz scala-9afc00c0408e49a111f381334cbdb7fcdaa4f340.tar.bz2 scala-9afc00c0408e49a111f381334cbdb7fcdaa4f340.zip |
Merge pull request #1664 from paulp/merge-2.10.x-master
Merge 2.10.x into master.
Diffstat (limited to 'test/files/pos/t6624.scala')
-rw-r--r-- | test/files/pos/t6624.scala | 28 |
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 |