mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* kochdocs.nim: code cleanup * docgen: nicer indentation * parser.nim: code cleanup * fixes #10458 * make tests green again * make =destroy mixins * gc:destructors: produced C code is almost working * --gc:destructors simple program compiles (but leaks memory) * gc:destructors make examples compile in C++ mode * destructors: string implementation bugfixes * strs.nim: minor code cleanup * destructors: builtin seqs are beginning to work * remove debugging helpers
22 lines
352 B
Nim
22 lines
352 B
Nim
discard """
|
|
errormsg: "index out of bounds: (a: 0) <= (i: 2) <= (b: 1) "
|
|
line: 18
|
|
"""
|
|
|
|
block:
|
|
try:
|
|
let a = @[1,2]
|
|
echo a[3]
|
|
except Exception as e:
|
|
doAssert e.msg == "index out of bounds: (i:3) <= (n:1) "
|
|
|
|
block:
|
|
type TTestArr = array[0..1, int16]
|
|
var f: TTestArr
|
|
f[0] = 30
|
|
f[1] = 40
|
|
f[2] = 50
|
|
f[3] = 60
|
|
|
|
echo(repr(f))
|