object Test extends App {
def f {
var a = Map.empty[Int, Int]
var b = Set.empty[(Int, Int)]
val v = 0 -> 0
a += v
b += v
}
}
Inlining
v
results in:object Test extends App {
def f {
var a = Map.empty[Int, Int]
var b = Set.empty[(Int, Int)]
a=a += 0 -> 0 // <----------------------- error here
b += 0 -> 0 // <-------------------------- this works fine
}
}
Leave a comment
on 2014-01-02 22:09 *
By Simon Schäfer
Description changed from
object Test ext... to
object Test ext...
on 2014-01-08 09:12 *
By Mirco Dotta
I could reproduce this with the latest Scala 2.11.0-20140103-034857-527fd9aea5. I haven't tried with 2.10.
Ticket assignment reverted due to inactivity.
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|