fix https://github.com/timotheecour/Nim/issues/88 (#13865) [backport:1.2]
This commit is contained in:
parent
87847150bf
commit
f1fd3ef7f4
2 changed files with 33 additions and 31 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue