Added test for #2078.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@18076 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
44945b42b4
commit
e9f439d846
|
|
@ -22,7 +22,7 @@ object Test {
|
|||
|
||||
def main(args: Array[String]) {
|
||||
val rt = Runtime.getRuntime()
|
||||
for (o <- 1 to 200000) {
|
||||
for (o <- 1 to 300000) {
|
||||
println("Outer [2AN] "+o)
|
||||
var a: List[A] = Nil
|
||||
for (i <- 1 to 10000) {
|
||||
|
|
@ -32,7 +32,7 @@ object Test {
|
|||
t ! Start
|
||||
}
|
||||
for (act <- a) act ! EndMe
|
||||
rt.gc()
|
||||
//rt.gc()
|
||||
println("Free "+z(rt.freeMemory())+" total "+z(rt.totalMemory()))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
class A[-S](y : S) {
|
||||
val f = new { val x = y }
|
||||
}
|
||||
|
||||
object Test extends Application {
|
||||
val a = new A(1)
|
||||
val b = a : A[Nothing]
|
||||
b.f.x
|
||||
}
|
||||
Loading…
Reference in New Issue