Skip to content

Commit fe3f8ef

Browse files
authored
add regression test for issue #17930 (#20227)
fix was implemented in #20167, so close the issue with a test fixes #17930
2 parents e9fd9e1 + 74f8159 commit fe3f8ef

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/run/i17930/Foo_1.scala

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package eu.joaocosta.defaultstest
2+
3+
object Foo {
4+
def foo(x: Int, y: Int = 5): Int = x + y
5+
}
6+
7+
object Bar {
8+
export Foo.*
9+
}
10+
11+
object App {
12+
println(Bar.foo(2)) // Works
13+
}

tests/run/i17930/app_2.scala

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import eu.joaocosta.defaultstest._
2+
3+
@main def Test =
4+
println(Foo.foo(2)) // Works
5+
println(Bar.foo(2)) // Fails with "missing argument for parameter y of method foo in object Bar: (x: Int, y: Int): Int"

0 commit comments

Comments
 (0)