From ee091ca1fdacccdb7da215628b1505c8e56c5086 Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Tue, 14 May 2024 16:55:58 +0200 Subject: [PATCH] Add test for #20342 --- tests/pos/i20342.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/pos/i20342.scala diff --git a/tests/pos/i20342.scala b/tests/pos/i20342.scala new file mode 100644 index 000000000000..250839680174 --- /dev/null +++ b/tests/pos/i20342.scala @@ -0,0 +1,15 @@ +class Repo[EC, E](using defaults: RepoDefaults[EC, E]) +trait RepoDefaults[EC, E] +object RepoDefaults: + inline given genImmutableRepo[E: DbCodec]: RepoDefaults[E, E] = ??? + inline given genRepo[EC: DbCodec, E: DbCodec]: RepoDefaults[EC, E] = ??? + +trait DbCodec[E] + +case class PersonCreator(name: String) +case class Person(id: Long) +given DbCodec[Person] = ??? +given DbCodec[PersonCreator] = ??? + +@main def Test = + val personRepo = Repo[PersonCreator, Person]