fixes #1434
This commit is contained in:
parent
af0de9090e
commit
f3d530e482
7 changed files with 54 additions and 15 deletions
30
tests/ccgbugs/tmissinginit.nim
Normal file
30
tests/ccgbugs/tmissinginit.nim
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
discard """
|
||||
output: '''0
|
||||
0
|
||||
0
|
||||
0
|
||||
[[a = nil,
|
||||
b = nil]]
|
||||
"""
|
||||
|
||||
# bug #1475
|
||||
type
|
||||
Crash = object
|
||||
a: string
|
||||
b: seq[string]
|
||||
|
||||
proc initCrash(): Crash = discard
|
||||
|
||||
proc test() =
|
||||
var blongname = [initCrash()]
|
||||
echo repr(blongname)
|
||||
|
||||
# bug #1434
|
||||
proc bug: array[1, int] = discard
|
||||
|
||||
echo bug()[0]
|
||||
echo bug()[0]
|
||||
echo bug()[0]
|
||||
echo bug()[0]
|
||||
|
||||
when isMainModule: test()
|
||||
Loading…
Add table
Add a link
Reference in a new issue