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
{{ message }}
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
defxa= println(a(Pair.apply)) // boom// missing arguments for method apply in object Pairdefxb= println(a(Pair.apply _)) // boom// Only function types can be followed by _ but the current expression has type Pairdefxc= println(a(Pair)) // boom// Found: Pair.type// Required: (Int, Int) => Any
Could anyone please transfer this issue to https://github.com/lampepfl/dotty-feature-requests/ in that case? If I open a new issue there, it would be identical to this one or refer to it, so it would probably better to avoid duplication.
Compiler version
3.0.1
Minimized code
Output
Expectation
Expected implicit apply to eta-expand, which would allow using a class's constructor as a function without having to supply (and later change) a placeholder for each constructor parameter, as in
Pair(_, _)
(prior discussion/motivation inhttps://contributors.scala-lang.org/t/let-constructors-to-be-considered-as-functions/3798)
The text was updated successfully, but these errors were encountered: