t15117.nim 416 B

12345678910111213141516171819202122232425262728
  1. discard """
  2. matrix: "--cc:vcc"
  3. disabled: "linux"
  4. disabled: "bsd"
  5. disabled: "osx"
  6. disabled: "unix"
  7. disabled: "posix"
  8. """
  9. {.experimental: "views".}
  10. let a: array[0, byte] = []
  11. discard a
  12. type B = object
  13. a:int
  14. let b: array[0, B] = []
  15. let c: array[0, ptr B] = []
  16. let d: array[0, ref B] = []
  17. discard b
  18. discard c
  19. discard d
  20. discard default(array[0, B])
  21. type
  22. View1 = openArray[byte]
  23. discard default(View1)