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