summaryrefslogtreecommitdiff
path: root/test/files/pos/t5359.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-05 15:01:07 -0800
committerPaul Phillips <paulp@improving.org>2012-01-05 21:07:55 -0800
commitcdd4aac9819bc6bb2872a503a1bb2542fcfb6230 (patch)
tree5b1c0d5fb25a4923b7aebc7a8c2a84d775c3cc24 /test/files/pos/t5359.scala
parent020053c3215579e8aeb871a4ad0078516994270d (diff)
downloadscala-cdd4aac9819bc6bb2872a503a1bb2542fcfb6230.tar.gz
scala-cdd4aac9819bc6bb2872a503a1bb2542fcfb6230.tar.bz2
scala-cdd4aac9819bc6bb2872a503a1bb2542fcfb6230.zip
Fix issue with higher-order type params.
I think I found an issue underlying more than one bit of sketchy behavior amongst CC[_] and friends. Plus, I managed to initialize TypeConstraints with the bounds of the originating type parameter. I feel like that should cause something nifty to happen somewhere, but I have seen neither confetti nor lasers in greater quantities than I usually do. Will keep my remaining eye out. Closes SI-5359, review by @moors.
Diffstat (limited to 'test/files/pos/t5359.scala')
-rw-r--r--test/files/pos/t5359.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/pos/t5359.scala b/test/files/pos/t5359.scala
new file mode 100644
index 0000000000..c22b2b1c76
--- /dev/null
+++ b/test/files/pos/t5359.scala
@@ -0,0 +1,17 @@
+// /scala/trac/5359/a.scala
+// Thu Jan 5 13:31:05 PST 2012
+
+object test {
+ trait Step[F[_]] {
+ // crash: typeConstructor inapplicable for <none>
+ this match {
+ case S1() =>
+ }
+ }
+ case class S1[F[_]]() extends Step[F]
+
+ // okay
+ (null: Step[Option]) match {
+ case S1() =>
+ }
+}