summaryrefslogtreecommitdiff
path: root/test/files/run/showraw_aliases.scala
blob: 3a68ca37b2d3a5268ec35061a84b9a85806daf7d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import scala.reflect.runtime.universe._
import scala.tools.reflect.ToolBox

object Test extends App {
  val tb = runtimeMirror(getClass.getClassLoader).mkToolBox()
  val tree = tb.parse("""
    import scala.reflect.runtime.{universe => ru}
    ru
  """)
  val ttree = tb.typeCheck(tree)

  def stabilize(s: String) = """#\d+""".r.replaceAllIn(s, "#<id>")
  println(showRaw(ttree))
  println(stabilize(showRaw(ttree, printIds = true)))
}