blob: 13f07497c85e5c84f60ac093dff3dff8ae5b61e2 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{currentMirror => cm}
object Test extends dotty.runtime.LegacyApp {
class C { def test(x: => Int) = println(x) }
val mm = cm.reflect(new C).reflectMethod(typeOf[C].member(TermName("test")).asMethod)
mm(2)
}
|