I wrote a function very similar to this:
def writeMyEl (x: TypeA, y: TypeB, z : TypeC) {
if (myMutableHashMap.contains((x, y)))
myMutableHashMap(x, y) = z else
myMutableHashMap += (x, y) -> z
}
In real code Types A and B are enumerations ans C is a case class. myMutableHashMap is defined as a val of type scala.collection.mutable.HashMap[(TypeA, TypeB), TypeC] inside the same class as the writeMyEl function.
Scala (2.8) compiler says:
error: too many arguments for method update: (key: (TypeA, TypeB),value: TypeC)Unit
What am I doing wrong?