mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
16
tests/arc/tmalloc.nim
Normal file
16
tests/arc/tmalloc.nim
Normal file
@@ -0,0 +1,16 @@
|
||||
discard """
|
||||
matrix: "--mm:arc -d:useMalloc; --mm:arc"
|
||||
"""
|
||||
|
||||
block: # bug #22058
|
||||
template foo(): auto =
|
||||
{.noSideEffect.}:
|
||||
newSeq[byte](1)
|
||||
|
||||
type V = object
|
||||
v: seq[byte]
|
||||
|
||||
proc bar(): V =
|
||||
V(v: foo())
|
||||
|
||||
doAssert bar().v == @[byte(0)]
|
||||
Reference in New Issue
Block a user