Skip to content

Fix #8649: Add regression test #12292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/test/dotc/pos-test-pickling.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ i11247.scala
i11250
i9999.scala
i12127.scala
8649.scala

# Opaque type
i5720.scala
Expand Down
32 changes: 32 additions & 0 deletions tests/pos/8649.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// This is crazy:
type Get0 = OK[Int, Unit]
def get0: Handler[Get0] = IO[Unit]()

case class HandlerAlt[A](value: Handler[A])

type Handler[API] = handler.Go[API]

case class IO[A]()
case class OK[A, B]()

object handler:
// Starter for Handler reduction:
type Go[API] = API match
case _ =>
HandlerSingle[API]

type HandlerSingle[X] = X match
case OK[_, response] =>
IO[response]

object Minimized {
case class HandlerAlt[A](value: M2[A])

type M1[X] = X match {
case _ => M2[X]
}

type M2[X] = X match {
case Int => String
}
}