fixes #15044 [backport:1.2]

This commit is contained in:
Andreas Rumpf 2020-07-23 16:53:07 +02:00
commit c90c53e8bb
2 changed files with 23 additions and 3 deletions

View file

@ -23,6 +23,7 @@ whiley ends :(
0
new line before - @['a']
new line after - @['a']
finalizer
closed
destroying variable: 20
destroying variable: 10
@ -258,6 +259,23 @@ newline.insert(indent, 0)
echo "new line after - ", newline
# bug #15044
type
Test = ref object
proc test: Test =
# broken
new(result, proc(x: Test) =
echo "finalizer"
)
proc tdirectFinalizer =
discard test()
tdirectFinalizer()
# bug #14480
proc hello(): int =
result = 42