-
Notifications
You must be signed in to change notification settings - Fork 1.1k
import export
ed function from another file lose default parameters
#15031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Log from scala-cli:
Seems like this bug has been fixed already. Interestingly, on my side it compiled on 3.1.2 but didn't compile on 3.1.1 |
3.1.2 introduced #14051 which most likely fixed the bug |
I use sbt, i'm sure scala version is 3.1.2. build.sbt val scala3Version = "3.1.2"
lazy val root = project
.in(file("."))
.settings(
name := "playground",
version := "0.1.0-SNAPSHOT",
scalaVersion := scala3Version,
) sbt compile command output: sbt:playground> compile
[info] compiling 1 Scala source to /Users/lee/repos/scala/playground/target/scala-3.1.2/classes ...
[error] -- Error: /Users/lee/repos/scala/playground/src/main/scala/exportBug.scala:4:15
[error] 4 | println(toStr())
[error] | ^^^^^^^
[error] |missing argument for parameter b of method toStr in package from: (b: Boolean): String
[error] one error found
[error] (Compile / compileIncremental) Compilation failed |
EDIT: Could you try to verify that? |
Oh, it works with |
I think we can reopen that as a bug in incremental compilation. It doesn't work very well with exports. Probably this issue is related to: #11841 . |
Compiler version
3.1.2
Minimized code
from/E.scala
main.scala
Output
compile error: missing argument for parameter b of method toStr in package from: (b: Boolean): String
Missing default parameters may be a compiler bug?
The text was updated successfully, but these errors were encountered: