-
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.
Merge pull request #13489 from dotty-staging/i13487
Fix #13487: Unification check in deriving is incorrect
- Loading branch information
Showing
4 changed files
with
17 additions
and
1 deletion.
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,4 @@ | ||
-- Error: tests/neg/i13487.scala:6:32 ---------------------------------------------------------------------------------- | ||
6 |case class Foo[A](a: A) derives TC // error | ||
| ^^ | ||
| Foo cannot be unified with the type argument of TC |
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 @@ | ||
trait TC[F[_, _[_]]] | ||
object TC { | ||
def derived[F[_, _[_]]]: TC[F] = ??? | ||
} | ||
|
||
case class Foo[A](a: A) derives TC // error |
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 @@ | ||
trait TC[F[_[_], _]] | ||
object TC { | ||
def derived[F[_[_], _]]: TC[F] = ??? | ||
} | ||
|
||
case class Foo[A](a: A) derives TC |