aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/showraw_tree_types_ids.scala
blob: 30f51c549b97c72771e0d95d52e2303b364b84d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import scala.reflect.runtime.universe._
import scala.tools.reflect.ToolBox

object Test extends dotty.runtime.LegacyApp {
  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, printTypes = true)))
  println(stabilize(showRaw(tb.typecheck(tree2.tree), printIds = true, printTypes = true)))
}