summaryrefslogtreecommitdiff
path: root/test/files/run/t7974/Test.scala
blob: 29d2b9cb645309903a1521c0e0e55b57f3f92639 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import java.io.PrintWriter;

import scala.tools.partest.BytecodeTest
import scala.tools.asm.util._
import scala.tools.nsc.util.stringFromWriter

object Test extends BytecodeTest {
  def show {
    val classNode = loadClassNode("Symbols", skipDebugInfo = true)
    val textifier = new Textifier
    classNode.accept(new TraceClassVisitor(null, textifier, null))

    val classString = stringFromWriter(w => textifier.print(w))
    val result =
      classString.split('\n')
        .dropWhile(elem => elem != "public class Symbols {")
        .filterNot(elem => elem.startsWith("  @Lscala/reflect/ScalaSignature") || elem.startsWith("  ATTRIBUTE ScalaSig"))
    result foreach println
  }
}