We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
inline def foo(f: () => Unit) = f() def bar() = foo(???)
[error] 1 |inline def foo(f: () => Unit) = f() [error] | ^^^ [error] | undefined: { [error] | f$proxy1 [error] | }.apply # 25695: TermRef(TermRef(NoPrefix,val f$proxy1),apply) at typer [error] one error found [error] (Compile / compileIncremental) Compilation failed
The code should compile.
The text was updated successfully, but these errors were encountered:
I ran into this when I mistakenly invoked this function:
inline def unless(b: Boolean)(f: () => Unit) = if (!b) f()
like this:
def baz(): Int = { unless(true) { return 5 } return 6 }
Of course, the f parameter should be by-name instead.
f
Sorry, something went wrong.
I think this could be tracked under the existing #8612 /cc @nicolasstucki
It is the same issue
No branches or pull requests
Minimized code
Output
Expectation
The code should compile.
The text was updated successfully, but these errors were encountered: