Eliminate the u
, eliminate the warning?
apm@mara:~$ scala210
Welcome to Scala version 2.10.4 (OpenJDK 64-Bit Server VM, Java 1.7.0_25).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import scala.reflect.runtime.universe
import scala.reflect.runtime.universe
scala> import universe._
import universe._
scala> class X { val x = 7 ; var y = "hi" }
defined class X
scala> typeOf[X].members collect { case m: MethodSymbol => m }
res0: Iterable[reflect.runtime.universe.MethodSymbol] = List(method y_=, method y, value x, constructor X, method $asInstanceOf, method $isInstanceOf, method synchronized, method ##, method !=, method ==, method ne, method eq, method notifyAll, method notify, method clone, method getClass, method hashCode, method toString, method equals, method wait, method wait, method wait, method finalize, method asInstanceOf, method isInstanceOf, method !=, method ==)
scala> typeOf[X].members collect { case m: MethodSymbol if m.isGetter => m }
res1: Iterable[reflect.runtime.universe.MethodSymbol] = List(method y, value x)