Possible Duplicates:
Why does pattern matching in Scala not work with variables?
Pattern match for variable in scope (Scala)
For example I have code
def equals(value1:String, value2:String) = value1 match {
case value2 => true
case _ => false
}
I found workaround, but I do not really like syntax
def equals(value1:String, value2:String) = value1 match { case v if v == value2 => true case _ => false }