diff --git a/tests/run/i13334.scala b/tests/run/i13334.scala new file mode 100644 index 000000000000..2ee0987c13cc --- /dev/null +++ b/tests/run/i13334.scala @@ -0,0 +1,16 @@ +// https://github.com/lampepfl/dotty/issues/13334 +trait DFC +given DFC = new DFC {} + +trait TC +object TC: + def foo()(using DFC): Unit = {} + + inline given (using DFC): TC = new TC: + foo() + +class Foo(using DFC): + summon[TC] + +@main def Test() = + val top = new Foo