tmissinginit.nim 344 B

12345678910111213141516171819202122232425262728293031
  1. discard """
  2. output: '''0
  3. 0
  4. 0
  5. 0
  6. [[a = "",
  7. b = []]]'''
  8. """
  9. # bug #1475
  10. type
  11. Crash = object
  12. a: string
  13. b: seq[string]
  14. proc initCrash(): Crash = discard
  15. proc test() =
  16. var blongname = [initCrash()]
  17. echo repr(blongname)
  18. # bug #1434
  19. proc bug: array[1, int] = discard
  20. echo bug()[0]
  21. echo bug()[0]
  22. echo bug()[0]
  23. echo bug()[0]
  24. test()