I have the following code. When compiling I get an error saying
value email is not a member of Player
class Player(email: String)
{
override def equals(player: Any): Boolean = {
player match {
case p: Player => email.equals(p.email)
case _ => false
}
}
}
I am a Java programmer trying out Scala and can't figure out why this error is occuring (From what I understand email is a member of player instance). Can someone give an explanation and how to solve this problem?