Merge pull request #8072 from LemonBoy/fix-6899-6280
Fix minor codegen issue with static data types
This commit is contained in:
commit
890086baec
1 changed files with 2 additions and 2 deletions
|
|
@ -59,7 +59,7 @@ proc genLiteral(p: BProc, n: PNode, ty: PType): Rope =
|
||||||
else:
|
else:
|
||||||
result = rope("NIM_NIL")
|
result = rope("NIM_NIL")
|
||||||
of nkStrLit..nkTripleStrLit:
|
of nkStrLit..nkTripleStrLit:
|
||||||
case skipTypes(ty, abstractVarRange).kind
|
case skipTypes(ty, abstractVarRange + {tyStatic}).kind
|
||||||
of tyNil:
|
of tyNil:
|
||||||
result = genNilStringLiteral(p.module, n.info)
|
result = genNilStringLiteral(p.module, n.info)
|
||||||
of tyString:
|
of tyString:
|
||||||
|
|
@ -385,7 +385,7 @@ proc genDeepCopy(p: BProc; dest, src: TLoc) =
|
||||||
else:
|
else:
|
||||||
addrLoc(p.config, a)
|
addrLoc(p.config, a)
|
||||||
|
|
||||||
var ty = skipTypes(dest.t, abstractVarRange)
|
var ty = skipTypes(dest.t, abstractVarRange + {tyStatic})
|
||||||
case ty.kind
|
case ty.kind
|
||||||
of tyPtr, tyRef, tyProc, tyTuple, tyObject, tyArray:
|
of tyPtr, tyRef, tyProc, tyTuple, tyObject, tyArray:
|
||||||
# XXX optimize this
|
# XXX optimize this
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue