Skip to content

Commit 9981e81

Browse files
Backport "add regression test for issue #17930" to LTS (#21069)
Backports #20227 to the LTS branch. PR submitted by the release tooling.
2 parents f821732 + be81ff4 commit 9981e81

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)