You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using named arguments with inline lambdas or method references, a compilation error occurs. However, the same code works when using unnamed arguments or assigning the lambda or method reference to a variable.
Fails with a compilation error (Method reference expression is not expected here)
Attempt to instantiate the class using named arguments with an inline lambda or method reference results in the following error: Method reference expression is not expected here
newFoo(fooFunction: String::length);
newFoo(fooFunction: s -> s.length());
Works as expected
Instantiating the class using 'unnamed' arguments or assigning the lambda or method reference to a variable works fine.
Ah, you are right, no problems when compiling. Do you think it is (easily) fixable in the IJ plugin?
I was using the old '2024' IJ plugin, but now, since I've update the the latest IJ (2025.1), I'm also using the '2025' version of the plugin, but that doesn't make any difference.
EotT123
pushed a commit
to EotT123/manifold-test
that referenced
this issue
May 23, 2025
Uh oh!
There was an error while loading. Please reload this page.
When using named arguments with inline lambdas or method references, a compilation error occurs. However, the same code works when using unnamed arguments or assigning the lambda or method reference to a variable.
Consider the following example class:
Fails with a compilation error (Method reference expression is not expected here)
Attempt to instantiate the class using named arguments with an inline lambda or method reference results in the following error:
Method reference expression is not expected here
Works as expected
Instantiating the class using 'unnamed' arguments or assigning the lambda or method reference to a variable works fine.
The text was updated successfully, but these errors were encountered: