File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ trait Deriving {
160160 val clsParamInfos = clsType.typeParams
161161 val clsArity = clsParamInfos.length
162162 val alignedClsParamInfos = clsParamInfos.takeRight(instanceArity)
163- val alignedTypeClassParamInfos = typeClassParamInfos.take (alignedClsParamInfos.length)
163+ val alignedTypeClassParamInfos = typeClassParamInfos.takeRight (alignedClsParamInfos.length)
164164
165165
166166 if ((instanceArity == clsArity || instanceArity > 0 ) && sameParamKinds(alignedClsParamInfos, alignedTypeClassParamInfos)) {
Original file line number Diff line number Diff line change 1+ -- Error: tests/neg/i13487.scala:6:32 ----------------------------------------------------------------------------------
2+ 6 |case class Foo[A](a: A) derives TC // error
3+ | ^^
4+ | Foo cannot be unified with the type argument of TC
Original file line number Diff line number Diff line change 1+ trait TC [F [_, _[_]]]
2+ object TC {
3+ def derived [F [_, _[_]]]: TC [F ] = ???
4+ }
5+
6+ case class Foo [A ](a : A ) derives TC // error
Original file line number Diff line number Diff line change 1+ trait TC [F [_[_], _]]
2+ object TC {
3+ def derived [F [_[_], _]]: TC [F ] = ???
4+ }
5+
6+ case class Foo [A ](a : A ) derives TC
You can’t perform that action at this time.
0 commit comments