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.
NamedArg
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
3.2, bcaa1ca
inline def foo(f: Int => Int): Int => Int = f inline def bar(inline f: Int => Int): Int => Int = f def g(i: Int): Int = i def test = foo(f = g) bar(f = g)
-Xprint:inlining
package <empty> { final lazy module val Test_2$package: Test_2$package = new Test_2$package() @SourceFile("t/Test_2.scala") final module class Test_2$package() extends Object() { this: Test_2$package.type => private def writeReplace(): AnyRef = new scala.runtime.ModuleSerializationProxy(classOf[Test_2$package.type]) def g(i: Int): Int = i def test: Int => Int = { { val f$proxy1: Int => Int = f = { def $anonfun(i: Int): Int = g(i) closure($anonfun) } f$proxy1:(Int => Int) } f = { def $anonfun(i: Int): Int = g(i) closure($anonfun) } :(Int => Int) } } }
We should not inline the f = from the named argument (NamedArg).
f =
The text was updated successfully, but these errors were encountered:
Remove NamedArg from inlined arguments
0b346f0
Fixes scala#17227
781a398
Remove NamedArg from inlined arguments (#17228)
ab9e75d
Fixes #17227
Successfully merging a pull request may close this issue.
Compiler version
3.2, bcaa1ca
Minimized code
Output
-Xprint:inlining
Expectation
We should not inline the
f =
from the named argument (NamedArg
).The text was updated successfully, but these errors were encountered: