parent
a754160d65
commit
ebd97884a0
1 changed files with 23 additions and 0 deletions
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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue