automatic eta-expansion should work for SAM expected type and function with single empty parameter clauses #17880
unkarjedy
started this conversation in
Feature Requests
Replies: 0 comments 1 reply
-
Here is the specification for automatic eta-expansion in Scala 3:
The nullary methods are explicitly treated differently, due to possible interaction with auto-application. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
(same as https://github.com/lampepfl/dotty/issues/11414)
reproduction steps
using Scala "3.0.0-M3"
Example
Problem
I would expect automatic eta-expansion work the same way for SAM expected type and Function expected type for functions with empty parameters: whether allow it or disallow
This is also taking into account that it works unified for 1-arity (currently it compiles OK for functions with non-empty parameters, for SAM and Function expected type)
Beta Was this translation helpful? Give feedback.
All reactions