Skip to content

Commit f630a18

Browse files
authored
Merge pull request #10041 from griggt/fix-#7960
Fix #7960: add regression test
2 parents 8225502 + d80126b commit f630a18

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)