++ ambiguous on Set[Any]

scala> Set[Any]("abc") ++ Set("def")
:5: error: ambiguous reference to overloaded definition,
both method ++ in trait Addable of type (Traversable[Any])scala.collection.immutable.Set[Any]
and method ++ in trait TraversableTemplate of type [B >: Any,That](Traversable[B])(implicit scala.collection.generic.BuilderFactory[B,That,scala.collection.immutable.Set[Any]])That
match argument types (scala.collection.immuta...
Set[Any]("abc") ++ Set("def")
^

But as long as the lhs isn't an Any set, it's okay with creating one:

scala> Set("abc") ++ Set(5)
res0: scala.collection.immutable.Set[Any] = Set(abc, 5)

Copyright © 2013 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland