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 error message seems to imply that += cannot be used with scala.collection.immutable.Set[String]. However, the first example (with var) shows that it can (the two sets are identical; the only thing that differs is the mutability of the LHS variable).
It might be more intuitive to change this particular error message to indicate that the problem is in the attempt to reassign to an immutable variable; that is, "error: reassignment to val" instead.
The text was updated successfully, but these errors were encountered:
Consider the following statements:
The error message seems to imply that += cannot be used with scala.collection.immutable.Set[String]. However, the first example (with var) shows that it can (the two sets are identical; the only thing that differs is the mutability of the LHS variable).
It might be more intuitive to change this particular error message to indicate that the problem is in the attempt to reassign to an immutable variable; that is, "error: reassignment to val" instead.
The text was updated successfully, but these errors were encountered: