Q:

Can't get inherited vals with Scala reflection

I'm using Scala 2.10.1 and I'm trying the define a method which will retrieve all the vals (including the inherited ones) from an object. 
I have the following:
import scala.reflect.runtime.{universe => ru}

object Reflection {

  val mirror = ru.runtimeMirror(this.getClass.getClassLoader)

  def findVals(x: Any): Iterable[String] = {
    val theType = mirror.classSymbol(x.getClass).toType
    theType.members.collect({case x if x.isTerm => x.asTerm}).filter(_.isVal).map(_.name.toString)
  }

}

I am testing on these two classes:
class Base {
  val x = 10
}

class Child extends Base {
  val y = 20
}

When calling the following code:
val x = new Child
val vs = Reflection.findVals(x)
println(vs)

The result is List(y)
For some reason, the isVal method returns false for the term corresponding to the x field from the Base class. 
Can someone tell me what's the problem here?  Am I doing something wrong? 

A:

Per Why don't Scala case class fields reflect as public?  you should use isAccessor instead of isVal.   
I'm actually using isGetter and setter to properly filter vars per your comment:
  def findVals(x: Any): Iterable[String] = {
    val theType = mirror.classSymbol(x.getClass).toType
    val xtm = theType.members.collect({case x if x.isTerm => x.asTerm})
    xtm.filter(m => m.isGetter && ! xtm.exists(m.setter == _)).map(_.name.toString)
  }

Results:
scala> class Base {
     | var x = 10
     | val xx = 2
     | }
defined class Base

scala> class Child extends Base {
     | val y = 3
     | }
defined class Child

scala> val x = new Child
x: Child = Child@1c0026e

scala> val vs = Reflection.findVals(x)
vs: Iterable[String] = List(y, xx)

scala> println(vs)
List(y, xx)

