Can anyone tell me why in this case:
Query(Users) foreach {case (userId, userName) =>
println(userId + ", " + userName) }
Scala recognizes userId, but in this case:
val l = List[(Int, String)]()
Query(Users) foreach {
case (userId, userName) =>
l::(foo(List[(userId, userName)]))
}
it doesnt? (as in, the userId on the right of the "=>" is recognized in the second case but not the first)
Users is a slick-mounted database that looks like this:
object Users extends Table[(Int, String)]("Users") {
def userId = column[Int]("UserId", O.PrimaryKey, O.AutoInc)
def userName = column[String]("UserName")
def * = userId ~ userName
}