Skip to content

Commit d80126b

Browse files
committed
Add regression test for #7960
1 parent 8225502 commit d80126b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tests/run/i7960.scala

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import scala.concurrent.ExecutionContext.Implicits.global
2+
import scala.concurrent.duration._
3+
import scala.concurrent.{Await, Future}
4+
5+
class A() {
6+
val bc = B.C(50)
7+
}
8+
9+
object A {
10+
Thread.sleep(100L)
11+
12+
val a = new A()
13+
}
14+
15+
16+
object B {
17+
Thread.sleep(100L)
18+
19+
case class C(a: Int)
20+
21+
val a: A = A.a
22+
}
23+
24+
object Test {
25+
def main(args: Array[String]): Unit = {
26+
Await.result(Future.sequence(Seq(
27+
Future { A.a },
28+
Future { B.a },
29+
)), 1.seconds)
30+
}
31+
}

0 commit comments

Comments
 (0)