Skip to content

Commit c50f73d

Browse files
committed
Added test for scala#2078.
1 parent 85a7be9 commit c50f73d

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

test/long-running/jvm/memleak2_actor.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object Test {
2222

2323
def main(args: Array[String]) {
2424
val rt = Runtime.getRuntime()
25-
for (o <- 1 to 200000) {
25+
for (o <- 1 to 300000) {
2626
println("Outer [2AN] "+o)
2727
var a: List[A] = Nil
2828
for (i <- 1 to 10000) {
@@ -32,7 +32,7 @@ object Test {
3232
t ! Start
3333
}
3434
for (act <- a) act ! EndMe
35-
rt.gc()
35+
//rt.gc()
3636
println("Free "+z(rt.freeMemory())+" total "+z(rt.totalMemory()))
3737
}
3838
}

test/pending/neg/t2078.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class A[-S](y : S) {
2+
val f = new { val x = y }
3+
}
4+
5+
object Test extends Application {
6+
val a = new A(1)
7+
val b = a : A[Nothing]
8+
b.f.x
9+
}

0 commit comments

Comments
 (0)