-
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.
SIP-56: Better foundations for match types (#18262)
Implementation of SIP-56: Proper Specification for Match Types https://docs.scala-lang.org/sips/match-types-spec.html
- Loading branch information
Showing
60 changed files
with
1,670 additions
and
290 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
709 changes: 493 additions & 216 deletions
709
compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.
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,16 @@ | ||
-- Error: tests/neg/6314-6.scala:26:3 ---------------------------------------------------------------------------------- | ||
26 | (new YY {}).boom // error: object creation impossible | ||
| ^ | ||
|object creation impossible, since def apply(fa: String): Int in trait XX in object Test3 is not defined | ||
|(Note that | ||
| parameter String in def apply(fa: String): Int in trait XX in object Test3 does not match | ||
| parameter Test3.Bar[X & Object with Test3.YY {...}#Foo] in def apply(fa: Test3.Bar[X & YY.this.Foo]): Test3.Bar[Y & YY.this.Foo] in trait YY in object Test3 | ||
| ) | ||
-- Error: tests/neg/6314-6.scala:52:3 ---------------------------------------------------------------------------------- | ||
52 | (new YY {}).boom // error: object creation impossible | ||
| ^ | ||
|object creation impossible, since def apply(fa: String): Int in trait XX in object Test4 is not defined | ||
|(Note that | ||
| parameter String in def apply(fa: String): Int in trait XX in object Test4 does not match | ||
| parameter Test4.Bar[X & Object with Test4.YY {...}#FooAlias] in def apply(fa: Test4.Bar[X & YY.this.FooAlias]): Test4.Bar[Y & YY.this.FooAlias] in trait YY in object Test4 | ||
| ) |
Oops, something went wrong.