This commit is contained in:
Timothee Cour
2020-04-05 15:24:35 -07:00
committed by GitHub
parent 87847150bf
commit f1fd3ef7f4
2 changed files with 33 additions and 31 deletions

View File

@@ -59,4 +59,13 @@ static:
static: # bug #8402
type R = ref object
var empty: R
let otherEmpty = empty
let otherEmpty = empty
block:
# fix https://github.com/timotheecour/Nim/issues/88
template fun() =
var s = @[10,11,12]
var a = s[0].addr
a[] += 100 # was giving SIGSEGV
doAssert a[] == 110
static: fun()