@@ -1529,7 +1529,7 @@ proc genRdVar(c: PCtx; n: PNode; dest: var TDest; flags: TGenFlags) =
1529
1529
1530
1530
template needsRegLoad(): untyped =
1531
1531
{gfNode, gfNodeAddr} * flags == {} and
1532
- fitsRegister(n.typ.skipTypes({tyVar, tyLent}))
1532
+ fitsRegister(n.typ.skipTypes({tyVar, tyLent, tyStatic }))
1533
1533
1534
1534
proc genArrAccess2(c: PCtx; n: PNode; dest: var TDest; opc: TOpcode;
1535
1535
flags: TGenFlags) =
@@ -1590,7 +1590,7 @@ proc getNullValueAux(obj: PNode, result: PNode; conf: ConfigRef) =
1590
1590
else : globalError(conf, result .info, " cannot create null element for: " & $ obj)
1591
1591
1592
1592
proc getNullValue(typ: PType, info: TLineInfo; conf: ConfigRef): PNode =
1593
- var t = skipTypes(typ, abstractRange- {tyTypeDesc})
1593
+ var t = skipTypes(typ, abstractRange+ {tyStatic} - {tyTypeDesc})
1594
1594
case t.kind
1595
1595
of tyBool, tyEnum, tyChar, tyInt.. tyInt64:
1596
1596
result = newNodeIT(nkIntLit, info, t)
@@ -1602,7 +1602,7 @@ proc getNullValue(typ: PType, info: TLineInfo; conf: ConfigRef): PNode =
1602
1602
result = newNodeIT(nkStrLit, info, t)
1603
1603
result .strVal = " "
1604
1604
of tyVar, tyLent, tyPointer, tyPtr, tyExpr,
1605
- tyStmt, tyTypeDesc, tyStatic, tyRef, tyNil:
1605
+ tyStmt, tyTypeDesc, tyRef, tyNil:
1606
1606
result = newNodeIT(nkNilLit, info, t)
1607
1607
of tyProc:
1608
1608
if t.callConv != ccClosure:
0 commit comments