From cfa9da313ecc1ce48ad451dc759ba0b2bbb40410 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Mon, 15 May 2023 10:36:08 +0200 Subject: [PATCH] test: add in a regression test for #13334 [skip community_build] closes #13334 --- tests/run/i13334.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/run/i13334.scala 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