Not really, but how to do it
$ cat Test.scala def Trace[T] = identity[T] _ val i = 1 Some(11) map {x => Trace(x + 1)} $ scala -Xprint:typer Test.scala 2>&1 | egrep --o 'Trace\[.*\]' Trace[T >: Nothing <: Any] Trace[Int]
The first trace comes from the definition of Trace and can be ignored. The same parameter (-Xprint: typer) also works with a scalar.
source share