Open
Description
Compiler version
Scala 3.2.0 / 3.2.1-RC2
Minimized example & Output
val function: Int => Int = (x: Int) => x
val polyfunction: [T] => T => T = [U] => (x: U) => x
function // somethingLambdaSomething: scala.Function1[Int, Int]
polyfunction // <function1>:
/* scala.Polyfunction {
* def apply[T >: scala.Nothing <: scala.Any](x$1: T): T
* }
*/
https://scastie.scala-lang.org/9VXAH9QKTyeSYE8UYdV5eQ
Expectation
val function: Int => Int = (x: Int) => x
val polyfunction: [T] => T => T = [U] => (x: U) => x
function // somethingLambdaSomething: Int => Int
polyfunction // <function1>: [T] => T => T
It's not that bad for Function1, but for polymorphic functions, it's really hard to parse, especially to newcomers !