Closed adamgfraser closed 1 year ago
I didn't turn up an identical Scala 2 ticket in scala/bug. but I'll note https://github.com/scala/bug/issues/9313 in passing anyway, since it's related in the sense that it's also about the (IMO) rather murky, semi-supported nature of by-name parameters to function values
Cross-referencing proposal on Discourse: Make by-name parameters just sugar syntax rather than actual types
Currently the code below does not compile.
printLine
takes a by name argument whereasflatMap
expects a function that takes an argument that is not by name. We can resolve the compilation error by replacingprintLine
withprintLine(_)
but it would be nice if the compiler allowed us to do this without the additional noise.