Skip to content

Commit affe8d0

Browse files
Merge pull request #12292 from dotty-staging/fix-8649-add-regression-test
Fix #8649: Add regression test
2 parents 1a460f8 + 226d908 commit affe8d0

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

compiler/test/dotc/pos-test-pickling.blacklist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ i11247.scala
3737
i11250
3838
i9999.scala
3939
i12127.scala
40+
8649.scala
4041

4142
# Opaque type
4243
i5720.scala

tests/pos/8649.scala

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// This is crazy:
2+
type Get0 = OK[Int, Unit]
3+
def get0: Handler[Get0] = IO[Unit]()
4+
5+
case class HandlerAlt[A](value: Handler[A])
6+
7+
type Handler[API] = handler.Go[API]
8+
9+
case class IO[A]()
10+
case class OK[A, B]()
11+
12+
object handler:
13+
// Starter for Handler reduction:
14+
type Go[API] = API match
15+
case _ =>
16+
HandlerSingle[API]
17+
18+
type HandlerSingle[X] = X match
19+
case OK[_, response] =>
20+
IO[response]
21+
22+
object Minimized {
23+
case class HandlerAlt[A](value: M2[A])
24+
25+
type M1[X] = X match {
26+
case _ => M2[X]
27+
}
28+
29+
type M2[X] = X match {
30+
case Int => String
31+
}
32+
}

0 commit comments

Comments
 (0)