fixes #5113
This commit is contained in:
parent
14e496fab0
commit
b43025b754
2 changed files with 17 additions and 0 deletions
9
tests/varres/tnewseq_on_result_vart.nim
Normal file
9
tests/varres/tnewseq_on_result_vart.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
discard """
|
||||
line: 9
|
||||
errormsg: "address of 'result' may not escape its stack frame"
|
||||
"""
|
||||
# bug #5113
|
||||
|
||||
proc makeSeqVar(size: Natural): var seq[int] =
|
||||
newSeq(result, size)
|
||||
Loading…
Add table
Add a link
Reference in a new issue