|
Scala example source code file (bug963.scala)
The Scala bug963.scala source code// Soundness bug, at #963 and dup at #2079. trait A { type T var v : T } object B { def f(x : { val y : A }) { x.y.v = x.y.v } var a : A = _ var b : Boolean = false def y : A = { if(b) { a = new A { type T = Int; var v = 1 } a } else { a = new A { type T = String; var v = "" } b = true a } } } object Test extends Application { B.f(B) } Other Scala examples (source code examples)Here is a short list of links related to this Scala bug963.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.