summary refs log tree commit diff stats
path: root/tests/errmsgs
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-12-30 00:06:57 +0800
committerGitHub <noreply@github.com>2022-12-29 17:06:57 +0100
commit705da9d452d19536689a32a8d4378bcce2ec320a (patch)
tree14a405b4c05b131a530193284fcce063a56da670 /tests/errmsgs
parente602ebeb66986e3de65324c81253513b139c7f0e (diff)
downloadNim-705da9d452d19536689a32a8d4378bcce2ec320a.tar.gz
fixes #14444; add `genLineDir` before assignment (#21201)
* fixes #14444; add `genLineDir` before raises

* add a test case

* fixes differently
Diffstat (limited to 'tests/errmsgs')
-rw-r--r--tests/errmsgs/t14444.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/errmsgs/t14444.nim b/tests/errmsgs/t14444.nim
new file mode 100644
index 000000000..143b4542e
--- /dev/null
+++ b/tests/errmsgs/t14444.nim
@@ -0,0 +1,14 @@
+discard """
+  matrix: "--hints:off"
+  exitcode: "1"
+  output: '''
+t14444.nim(13)           t14444
+fatal.nim(51)            sysFatal
+Error: unhandled exception: index out of bounds, the container is empty [IndexDefect]
+'''
+"""
+
+when true: # bug #14444
+  var i: string
+  i[10] = 'j'
+  echo i
\ No newline at end of file