blob: a8507623bc18d6fe4c436bfa41fb40a013a9695d (
plain) (
tree)
|
|
import scala.reflect.runtime.universe._
import scala.tools.reflect.ToolBox
object Test extends App {
val tb = runtimeMirror(getClass.getClassLoader).mkToolBox()
val tree1 = reify(new collection.immutable.HashMap[String, String])
val tree2 = reify(new collection.mutable.HashMap[String, String])
def stabilize(s: String) = """#\d+""".r.replaceAllIn(s, "#<id>")
println(stabilize(showRaw(tb.typeCheck(tree1.tree), printIds = true, printKinds = true, printTypes = true)))
println(stabilize(showRaw(tb.typeCheck(tree2.tree), printIds = true, printKinds = true, printTypes = true)))
}
|