|
Scala example source code file (bug3278.scala)
The Scala bug3278.scala source code
class Foo
class Test {
def update[B](x : B, b : Int) {}
def apply[B](x : B) = 1
}
object Test {
def main(a : Array[String]) {
val a = new Test
val f = new Foo
a(f) = 1 //works
a(f) = a(f) + 1 //works
a(f) += 1 //error: reassignment to val
}
}
Other Scala examples (source code examples)Here is a short list of links related to this Scala bug3278.scala source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.