mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
17 lines
255 B
Nim
17 lines
255 B
Nim
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)]
|