tlargeindex.nim 649 B

12345678910111213141516171819
  1. discard """
  2. cmd: "nim check --hints:off $file"
  3. """
  4. # issue #17163
  5. var e: array[int32, byte] #[tt.Error
  6. ^ index type 'int32' for array is too large]#
  7. var f: array[uint32, byte] #[tt.Error
  8. ^ index type 'uint32' for array is too large]#
  9. var g: array[int64, byte] #[tt.Error
  10. ^ index type 'int64' for array is too large]#
  11. var h: array[uint64, byte] #[tt.Error
  12. ^ index type 'uint64' for array is too large]#
  13. # crash in issue #23204
  14. proc y[N](): array[N, int] = default(array[N, int]) #[tt.Error
  15. ^ index type 'int' for array is too large]#
  16. discard y[int]()