blob: 7095158e858658a4867908b335816fd0367b6111 (
plain) (
tree)
|
|
import scala.reflect.runtime.universe._
class Foo(bar: Int)
object Test extends App {
val foo = new Foo(2)
val tpe = getType(foo)
val bar = tpe.nonPrivateMember(newTermName("bar"))
bar match {
case NoSymbol => println("no public member")
case _ => println("i'm screwed")
}
}
|