scalac -print prints code after implicit type conversions where applicable.
class A{ val x : String = "hi" drop 1 }
will result in:
package <empty> { class A extends java.lang.Object with ScalaObject { @remote def $tag(): Int = scala.ScalaObject$class.$tag(A.this); private[this] val x: java.lang.String = _; <stable> <accessor> def x(): java.lang.String = A.this.x; def this(): A = { A.super.this(); A.this.x = scala.this.Predef.forceRandomAccessCharSeq( scala.this.Predef.stringWrapper("hi").drop(1)); () } } }
source share