https://github.com/scala/scala/blob/3b0cf29b794fc9c9c5409c0443802a815afbbf04/src/reflect/scala/reflect/internal/Types.scala#L4605-L4622
The lambda encoding hoists these automatically:
scala> def foo = (_: Any).toString
foo: Any => String
scala> foo eq foo
res0: Boolean = true
scala> def bar = (_: Any).toString
bar: Any => String
scala> bar eq bar
res1: Boolean = true
scala> bar eq foo
res2: Boolean = false
Inlining these will likely result in more readable code. There will be a small cost (creation of the anonfun methods at each place that defines a "copy" of the same lambda), although we could and should eliminate that with #102