1
import scala.reflect.runtime.universe._
2
import scala.tools.reflect.ToolBox
4
object Test extends App {
5
val tb = runtimeMirror(getClass.getClassLoader).mkToolBox()
6
val tree1 = reify(new collection.immutable.HashMap[String, String])
7
val tree2 = reify(new collection.mutable.HashMap[String, String])
8
def stabilize(s: String) = """#\d+""".r.replaceAllIn(s, "#<id>")
9
println(stabilize(showRaw(tb.typeCheck(tree1.tree), printIds = true, printKinds = true, printTypes = true)))
10
println(stabilize(showRaw(tb.typeCheck(tree2.tree), printIds = true, printKinds = true, printTypes = true)))
b'\\ No newline at end of file'