Skip to content

Commit

Permalink
fix #18971
Browse files Browse the repository at this point in the history
since the example code return value from global variable, instead
of first argument, the `n.len` is 1 which causes compiler crashes.
  • Loading branch information
derekdai committed Oct 29, 2021
1 parent cfdac66 commit 42d9fc8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/arc/t18971.nim
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 42d9fc8

Please sign in to comment.