File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ -- [E172] Type Error: tests/neg/i18670.scala:11:38 ---------------------------------------------------------------------
2
+ 11 |case class Summary() extends Payload() // error
3
+ | ^
4
+ | No given instance of type TC[A] was found for a context parameter of constructor Payload in class Payload.
5
+ | I found:
6
+ |
7
+ | TC.derived[A](/* missing */summon[scala.deriving.Mirror.Of[A]])
8
+ |
9
+ | But Failed to synthesize an instance of type scala.deriving.Mirror.Of[A]:
10
+ | * class Nothing is not a generic product because it is not a case class
11
+ | * class Nothing is not a generic sum because it is not a sealed class
12
+ |
13
+ | where: A is a type variable with constraint <: Payload[A]
14
+ | .
Original file line number Diff line number Diff line change
1
+ import scala .deriving .Mirror
2
+
3
+ type TC [A ]
4
+
5
+ object TC :
6
+ inline given derived [A ](using Mirror .Of [A ]): TC [A ] = ???
7
+
8
+ abstract class Payload [A <: Payload [A ]: TC ]()
9
+
10
+ // infers Nothing and fail compilation
11
+ case class Summary () extends Payload () // error
You can’t perform that action at this time.
0 commit comments