Freeze top-level val. (#1906)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user