-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix #21914 The wildcard patterns are projected to nullable #21850, which increases the running time exponentially for complex patterns, due to the way we simplify and minus spaces. However, the current space analyse setup is only able to track nullable value at top level, so we should not project nested wildcard patterns (not at top level) to nullable. The warnings in `tests/warn/i20121.scala`, `tests/warn/i20122.scala`, and `tests/warn/i20123.scala` will become wrong again, but there is no simple solution to fix them quickly. I couldn't create a minimised test for #21914, but I have verified locally the compile time becomes normal again with this fix.
- Loading branch information
Showing
7 changed files
with
12 additions
and
14 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
6: Match case Unreachable | ||
14: Match case Unreachable |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
6: Match case Unreachable | ||
13: Pattern Match | ||
18: Match case Unreachable | ||
20: Pattern Match | ||
21: Match case Unreachable |
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 |
---|---|---|
|
@@ -18,5 +18,6 @@ class Test { | |
case Some(null) => | ||
case None => | ||
case y => | ||
case _ => | ||
} | ||
} |
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
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