summary refs log blame commit diff stats
path: root/tests/ccgbugs/tmissinginit.nim
blob: b4087008af779b35301aa0227b89565c5b128a26 (plain) (tree)
1
2
3
4
5
6
7




              

           






















                                 
discard """
  output: '''0
0
0
0
[[a = "",
b = []]]'''
"""

# 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()