testindexerroroutput.nims 385 B

123456789101112131415161718192021222324
  1. mode = ScriptMode.Verbose
  2. case paramStr(3):
  3. of "test1":
  4. #543
  5. block:
  6. let s = "abc"
  7. discard s[len(s)]
  8. of "test2":
  9. #537
  10. block:
  11. var s = "abc"
  12. s[len(s)] = 'd'
  13. of "test3":
  14. #588
  15. block:
  16. let arr = ['a', 'b', 'c']
  17. discard arr[len(arr)]
  18. of "test4":
  19. #588
  20. block:
  21. var arr = ['a', 'b', 'c']
  22. arr[len(arr)] = 'd'