mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
23
tests/arc/t14472.nim
Normal file
23
tests/arc/t14472.nim
Normal file
@@ -0,0 +1,23 @@
|
||||
discard """
|
||||
valgrind: true
|
||||
cmd: "nim c --gc:arc -d:useMalloc $file"
|
||||
"""
|
||||
|
||||
type
|
||||
ImportMaterial* = object
|
||||
# Adding a field here makes the problem go away.
|
||||
|
||||
Mesh* = object
|
||||
vertices: seq[float32]
|
||||
material: ImportMaterial
|
||||
|
||||
ImportedScene* = object
|
||||
meshes*: seq[Mesh]
|
||||
|
||||
proc bork() : ImportedScene =
|
||||
var mats: seq[ImportMaterial]
|
||||
|
||||
setLen(mats, 1)
|
||||
add(result.meshes, Mesh(material: mats[0]))
|
||||
|
||||
var s = bork()
|
||||
Reference in New Issue
Block a user