diff options
Diffstat (limited to 'tests/array')
-rw-r--r-- | tests/array/tarrindx.nim | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/array/tarrindx.nim b/tests/array/tarrindx.nim index 3bb6b0148..9e8ec31b6 100644 --- a/tests/array/tarrindx.nim +++ b/tests/array/tarrindx.nim @@ -1,6 +1,8 @@ discard """ output: '''0 -0''' +0 +bc +bcdefg''' """ # test another strange bug ... (I hate this compiler; it is much too buggy!) @@ -29,3 +31,13 @@ var echo obj.s1[0] echo obj.s1[0u] + + +# bug #8049 + +when true: + type ustring* = distinct string + converter toUString*(s: string): ustring = ustring(s) + proc `[]`*(s: ustring, i: int): ustring = s + echo "abcdefgh"[1..2] + echo "abcdefgh"[1..^2] |