From 74f8159649815b673f5e213f91de98d247eda86b Mon Sep 17 00:00:00 2001 From: Jamie Thompson Date: Thu, 18 Apr 2024 17:12:03 +0200 Subject: [PATCH] add regression test for issue #17930 --- tests/run/i17930/Foo_1.scala | 13 +++++++++++++ tests/run/i17930/app_2.scala | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 tests/run/i17930/Foo_1.scala create mode 100644 tests/run/i17930/app_2.scala diff --git a/tests/run/i17930/Foo_1.scala b/tests/run/i17930/Foo_1.scala new file mode 100644 index 000000000000..0ee4fa711f58 --- /dev/null +++ b/tests/run/i17930/Foo_1.scala @@ -0,0 +1,13 @@ +package eu.joaocosta.defaultstest + +object Foo { + def foo(x: Int, y: Int = 5): Int = x + y +} + +object Bar { + export Foo.* +} + +object App { + println(Bar.foo(2)) // Works +} diff --git a/tests/run/i17930/app_2.scala b/tests/run/i17930/app_2.scala new file mode 100644 index 000000000000..64ba6bff18c5 --- /dev/null +++ b/tests/run/i17930/app_2.scala @@ -0,0 +1,5 @@ +import eu.joaocosta.defaultstest._ + +@main def Test = + println(Foo.foo(2)) // Works + println(Bar.foo(2)) // Fails with "missing argument for parameter y of method foo in object Bar: (x: Int, y: Int): Int"