diff options
author | Paul Phillips <paulp@improving.org> | 2012-01-05 15:01:07 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-01-05 21:07:55 -0800 |
commit | cdd4aac9819bc6bb2872a503a1bb2542fcfb6230 (patch) | |
tree | 5b1c0d5fb25a4923b7aebc7a8c2a84d775c3cc24 /test/files/pos/t5359.scala | |
parent | 020053c3215579e8aeb871a4ad0078516994270d (diff) | |
download | scala-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.scala | 17 |
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() => + } +} |