closes #11533
This commit is contained in:
parent
35df59b3ce
commit
0db3c670ac
1 changed files with 18 additions and 0 deletions
|
|
@ -2,6 +2,9 @@ discard """
|
||||||
cmd: '''nim c --newruntime $file'''
|
cmd: '''nim c --newruntime $file'''
|
||||||
output: '''a b
|
output: '''a b
|
||||||
70
|
70
|
||||||
|
hello
|
||||||
|
hello
|
||||||
|
hello
|
||||||
2 2 alloc/dealloc pairs: 0'''
|
2 2 alloc/dealloc pairs: 0'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -26,5 +29,20 @@ proc wrap =
|
||||||
foo fIt
|
foo fIt
|
||||||
|
|
||||||
wrap()
|
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()
|
let (a, d) = allocCounters()
|
||||||
discard cprintf("%ld %ld alloc/dealloc pairs: %ld\n", a, d, system.allocs)
|
discard cprintf("%ld %ld alloc/dealloc pairs: %ld\n", a, d, system.allocs)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue