blob: e80bd12369aa25a5880c183f615af11ac67f7936 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
import scala.reflect.runtime.universe._
class Foo { val bar = 2 }
object Test extends App {
val foo = new Foo
val tpe = getType(foo)
val bar = tpe.nonPrivateMember(newTermName("bar"))
val value = getValue(foo, bar)
println(value)
}
|