tmissinginit.nim 366 B

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