Fix 15543 (#15544)
* fix #15543 * fix spacing * fix test * simplify test for freebsd platform
This commit is contained in:
parent
d66e274e1a
commit
9668a1106d
2 changed files with 22 additions and 2 deletions
|
|
@ -1487,7 +1487,7 @@ proc genTypeInfoV1(m: BModule, t: PType; info: TLineInfo): Rope =
|
||||||
elif origType.attachedOps[attachedDeepCopy] != nil:
|
elif origType.attachedOps[attachedDeepCopy] != nil:
|
||||||
genDeepCopyProc(m, origType.attachedOps[attachedDeepCopy], result)
|
genDeepCopyProc(m, origType.attachedOps[attachedDeepCopy], result)
|
||||||
|
|
||||||
if optTinyRtti in m.config.globalOptions and t.kind == tyObject:
|
if optTinyRtti in m.config.globalOptions and t.kind == tyObject and sfImportc notin t.sym.flags:
|
||||||
let v2info = genTypeInfoV2(m, origType, info)
|
let v2info = genTypeInfoV2(m, origType, info)
|
||||||
addf(m.s[cfsTypeInit3], "$1->typeInfoV1 = (void*)&$2; $2.typeInfoV2 = (void*)$1;$n", [
|
addf(m.s[cfsTypeInit3], "$1->typeInfoV1 = (void*)&$2; $2.typeInfoV2 = (void*)$1;$n", [
|
||||||
v2info, result])
|
v2info, result])
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
valgrind: true
|
valgrind: true
|
||||||
cmd: "nim c --gc:arc -d:useMalloc $file"
|
cmd: "nim cpp --gc:arc -d:useMalloc --deepcopy:on $file"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
@ -21,3 +21,23 @@ proc bork() : ImportedScene =
|
||||||
add(result.meshes, Mesh(material: mats[0]))
|
add(result.meshes, Mesh(material: mats[0]))
|
||||||
|
|
||||||
var s = bork()
|
var s = bork()
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
# issue #15543
|
||||||
|
|
||||||
|
import tables
|
||||||
|
|
||||||
|
type
|
||||||
|
cdbl {.importc: "double".} = object
|
||||||
|
|
||||||
|
MyObject = ref object of RootObj
|
||||||
|
y: Table[string, cdbl]
|
||||||
|
|
||||||
|
|
||||||
|
proc test =
|
||||||
|
var x = new(MyObject)
|
||||||
|
|
||||||
|
test()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue