since the example code return value from global variable, instead of first argument, the `n.len` is 1 which causes compiler crashes.
This commit is contained in:
parent
cfdac6666f
commit
f755e452d2
2 changed files with 11 additions and 1 deletions
10
tests/arc/t18971.nim
Normal file
10
tests/arc/t18971.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
discard """
|
||||
cmd: "nim c --gc:arc $file"
|
||||
"""
|
||||
|
||||
type MyObj = ref object
|
||||
|
||||
var o = MyObj()
|
||||
proc x: var MyObj = o
|
||||
|
||||
var o2 = x()
|
||||
Loading…
Add table
Add a link
Reference in a new issue