Skip to content

Commit

Permalink
Backport "add regression test for issue #17930" to LTS (#21069)
Browse files Browse the repository at this point in the history
Backports #20227 to the LTS branch.

PR submitted by the release tooling.
  • Loading branch information
WojciechMazur authored Jul 5, 2024
2 parents f821732 + be81ff4 commit 9981e81
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 9981e81

Please sign in to comment.