Skip to content

Commit

Permalink
add regression test for issue #17930 (#20227)
Browse files Browse the repository at this point in the history
fix was implemented in #20167, so
close the issue with a test

fixes #17930
  • Loading branch information
smarter authored Apr 18, 2024
2 parents e9fd9e1 + 74f8159 commit fe3f8ef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/run/i17930/Foo_1.scala
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions tests/run/i17930/app_2.scala
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit fe3f8ef

Please sign in to comment.