mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 19:52:36 +00:00
24 lines
430 B
Nim
24 lines
430 B
Nim
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()
|