Compilation error in RDD.scala