Freeze top-level val. (#1906)

This commit is contained in:
Nikolay Igotti
2018-08-22 14:30:42 +03:00
committed by GitHub
parent f0cfbb9918
commit a216bf8903
17 changed files with 107 additions and 39 deletions
@@ -19,6 +19,7 @@ fun bar(b: B) {
foo(c)
}
@ThreadLocal
val global = B()
@Test fun runTest() {
@@ -68,6 +68,7 @@ class Graph(val nodes: List<Node>, val roots: List<Node>)
fun min(x: Int, y: Int) = if (x < y) x else y
fun max(x: Int, y: Int) = if (x > y) x else y
@ThreadLocal
val random = Random(42)
fun generate(condensationSize: Int, branchingFactor: Int, swellingFactor: Int): Graph {