(cherry picked from commit 0db3c670ac)
This commit is contained in:
Andreas Rumpf
2019-06-21 20:45:00 +02:00
committed by narimiran
parent ef018d7a63
commit 4d18ee498a

View File

@@ -2,6 +2,9 @@ discard """
cmd: '''nim c --newruntime $file'''
output: '''a b
70
hello
hello
hello
2 2 alloc/dealloc pairs: 0'''
"""
@@ -26,5 +29,20 @@ proc wrap =
foo fIt
wrap()
# bug #11533
proc say = echo "hello"
# Error: internal error: genAssignment: tyNil
var err0: proc() = say
err0()
var ok0: proc()
ok0 = say
ok0()
var ok1 = say
ok1()
let (a, d) = allocCounters()
discard cprintf("%ld %ld alloc/dealloc pairs: %ld\n", a, d, system.allocs)