-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #8757: check wildcard star patterns by tree instead of type
- Loading branch information
1 parent
66f335c
commit 71f5b3a
Showing
3 changed files
with
13 additions
and
2 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 @@ | ||
8: Pattern Match Exhaustivity: C() |
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,10 @@ | ||
sealed trait T | ||
|
||
case class C(xs: Int*) extends T | ||
|
||
def f(): Unit = (C(42): T) match { case C(xs: _*) => } | ||
def g(): Unit = (C(42): T) match { case C(_: _*) => } | ||
|
||
def h(): Unit = (C(42): T) match | ||
case C(5, _: _*) => | ||
case C(x, xs: _*) => |