mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
since the example code return value from global variable, instead of first argument, the `n.len` is 1 which causes compiler crashes.
11 lines
124 B
Nim
11 lines
124 B
Nim
discard """
|
|
cmd: "nim c --gc:arc $file"
|
|
"""
|
|
|
|
type MyObj = ref object
|
|
|
|
var o = MyObj()
|
|
proc x: var MyObj = o
|
|
|
|
var o2 = x()
|