You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result of a method, taking an object of some case class, can not be assigned to a variable with the name as the name of any field of that class #5044
case class A(
id: Int = 0,
name: String = "",
age: Int = 20
)
object Tmp {
def m(a: A) = ""
def main(args: Array[String]) {
val a = A(name = "")
val name = Tmp.m(a) // compiler error: recursive value a needs type
println(">")
}
}