Skip to content

Commit 0cf9d10

Browse files
nicolasstuckibiboudis
authored andcommitted
Add log to proxy calls
1 parent 0cfaefd commit 0cf9d10

File tree

1 file changed

+4
-0
lines changed
  • tests/run-with-compiler-custom-args/tasty-interpreter/interpreter/jvm

1 file changed

+4
-0
lines changed

tests/run-with-compiler-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ class Interpreter[R <: Reflection & Singleton](reflect0: R) extends TreeInterpre
2323
val instance = new Object
2424

2525
def invoke(proxy: Object, method: Method, args: scala.Array[Object]): Object = {
26+
if (LOG) {
27+
val proxyString = if (method.getName == "toString") method.invoke(instance) else proxy.toString
28+
println(s"%> proxy call `$method` on `$proxyString` with args=${if (args == null) Nil else args.toList}")
29+
}
2630

2731
// println(method)
2832
val symbol = sym.methods.find(_.name == method.getName).get

0 commit comments

Comments
 (0)