forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scala#6697: Ingore bounds checks in match type pat
Similarly to what's done for values when we write `case _: F[x]`, there is no need to check that `x` conforms to its bounds as we are currently binding it.
- Loading branch information
1 parent
71234eb
commit 79e232d
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
object Test { | ||
sealed trait Off | ||
case class Of[sup, sub <: sup]() extends Off | ||
type Sup[O <: Off] = O match { case Of[sup, sub] => sup } | ||
type Sub[O <: Off] = O match { case Of[sup, sub] => sub } | ||
type Copy[O <: Off] = Of[Sup[O], Sub[O]] | ||
} |