-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Import exported function from a library loses the default parameters #17930
Comments
It reproduces on HEAD with separate compilation. That's running |
I just ran into this issue as well, while looking into ways to split an API with a many methods with default parameters into manageable chunks, but keeping a single entry-point to call these methods sbrunk/storch#29. Export clauses seem like the perfect solution here, but given the large number of methods with default parameters, we'll have to wait until we have a fix for this issue. |
This seems like something we can maybe solve similar to constructor proxies (i.e. a constructor proxy is a fake inline |
We have the same problem in Besom with exported functions losing default args. |
Backports #20227 to the LTS branch. PR submitted by the release tooling.
Compiler version
3.3.0
Minimized code
lib.scala:
Published with
scala-cli --power publish local .\lib.scala
app.sc
Output
Expectation
The code should compile, using the default methods (same behavior as
Foo.foo(2)
)Notes
This seems very similar to #15031, although in my case the problem happens when importing a library.
No amount of
clean
/compile
seems to fix it.The text was updated successfully, but these errors were encountered: