* fixes #12899

* fixes regression: destroy global variables in reverse declaration order, closureleak test relies on it
This commit is contained in:
Andreas Rumpf 2019-12-18 07:54:20 +01:00 • committed by GitHub
commit 3f6df5cc34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 15 deletions

View file

@ -6,7 +6,7 @@ discard """
type
TFoo* = object
id: int
fn: proc(){.closure.}
fn: proc() {.closure.}
var foo_counter = 0
var alive_foos = newseq[int](0)
@ -31,7 +31,7 @@ proc newFoo*(): ref TFoo =
inc foo_counter
for i in 0 ..< 10:
discard newFoo()
discard newFoo()
for i in 0 ..< 10:
let f = newFoo()