mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 14:55:24 +00:00
fix https://github.com/timotheecour/Nim/issues/88 (#13865) [backport:1.2]
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user