blob: 3c930fbbc1188a3c677472714ffde576d0f959bd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
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("Lean")
def showMethod(name: String) {
val meth = getMethod(classNode, name)
println(name)
val textifier = new Textifier()
meth.accept(new TraceMethodVisitor(textifier))
println(stringFromWriter(w => textifier.print(w)))
println()
}
showMethod("string")
showMethod("module")
}
}
class Lean {
def string {
"" == toString
}
def module {
Nil == (toString: Any)
}
}
|