New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure to unify types of mutable collections #4938
Comments
Imported From: https://issues.scala-lang.org/browse/SI-4938?orig=1 |
@paulp said: scala> lub(List("Set", "Seq") map (intp types "scala.collection.mutable." + _) map (s => typeRef(NoPrefix, s, List(ObjectClass.tpe))))
res22: $r.intp.global.Type =
scala.collection.mutable.Iterable[java.lang.Object]
with java.lang.Object
with Int => Any
with scala.collection.mutable.Cloneable[
scala.collection.mutable.Iterable[java.lang.Object]
with java.lang.Object
with Int => Any
with scala.collection.mutable.Cloneable[
scala.collection.mutable.Iterable[java.lang.Object]
with java.lang.Object
with Int => Any
with scala.collection.mutable.Cloneable[
scala.collection.mutable.Iterable[java.lang.Object]
with Nothing => Any
with scala.collection.mutable.Cloneable[Any]
] {
def seq: scala.collection.mutable.Iterable[java.lang.Object]
with Nothing => Any
with scala.collection.mutable.Cloneable[Any]
}
]
] |
@paulp said: |
@paulp said: |
Entering the following in the REPL,
will fail to compile with the error
I would expect that some valid upper bound should be found. There is no problem with the immutable collection types, nor a combination of immutable and mutable collections.
The issue was reported on Stack Overflow: http://stackoverflow.com/questions/7155066/adding-to-scala-map-within-for-loop-and-conditional-statement
The text was updated successfully, but these errors were encountered: