-
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.
Add a 3.6-migration warning for MT lubbing
- Loading branch information
Showing
3 changed files
with
26 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,6 @@ | ||
-- Migration Warning: tests/warn/i21258.scala:4:17 --------------------------------------------------------------------- | ||
4 | type MT[X] = X match { // warn | ||
| ^ | ||
| Match type upper bound inferred as String, where previously it was defaulted to Any | ||
5 | case Int => String | ||
6 | } |
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,14 @@ | ||
import scala.language.`3.6-migration` | ||
|
||
object Test { | ||
type MT[X] = X match { // warn | ||
case Int => String | ||
} | ||
|
||
def unboundUnreducibleSig[X](x: X): MT[X] = ??? | ||
|
||
type MT2[X] = X match { // no warning | ||
case Int => String | ||
case String => Any | ||
} | ||
} |