Skip to content

Commit be81ff4

Browse files
bishaboshaWojciechMazur
authored andcommitted
add regression test for issue #17930
[Cherry-picked 74f8159]
1 parent c0d640b commit be81ff4

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/run/i17930/Foo_1.scala

Lines changed: 13 additions & 0 deletions
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

Lines changed: 5 additions & 0 deletions
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)