From b080235ed1e7aba3a5d603dd34ae27360f521958 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Fri, 12 May 2023 08:32:34 +0200 Subject: [PATCH] test: add regression test for #7790 --- tests/pos/i7790.scala | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/pos/i7790.scala diff --git a/tests/pos/i7790.scala b/tests/pos/i7790.scala new file mode 100644 index 000000000000..0a0e2d2ce347 --- /dev/null +++ b/tests/pos/i7790.scala @@ -0,0 +1,9 @@ +// https://github.com/lampepfl/dotty/issues/7790 +trait Foo: + given Int = 10 + def map(f: Int ?=> Int) = f + def map(f: Int ?=> String) = f + +@main def Test = + val m: Foo = ??? + m.map((x: Int) ?=> x)