The IDE sometimes shows me 2 (or more) copies of each error, compiling
in Maven I see the error just once.
I've got a reproducible example here:
screenshot:
http://img7.imagebanana.com/img/fmaabukq/Selection_010.png
The error is the line with l.foo.toString, obviously there is no
method foo on Int. If I remove it, and instead have "l.toString" then
it compiles fine.
class Test {
def competitors(xhtml: NodeSeq): NodeSeq = {
List("foo", "bar") match {
case Nil => Nil
case competitors =>
def bindCompetitors(xhtml: NodeSeq): NodeSeq =
competitors.flatMap { competitor =>
val l: Int = competitor.length
bind("competitor", xhtml,
"link" -> l.foo.toString
)
}
bind("competitors", xhtml,
"list" -> { bindCompetitors(_) }
)
}
}
}