diff options
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/ccgexprs.nim | 4 | ||||
-rwxr-xr-x | compiler/cgen.nim | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index d10b37432..d6666d88b 100755 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -223,7 +223,7 @@ proc genAssignment(p: BProc, dest, src: TLoc, flags: TAssignmentFlags) = # little HACK to support the new 'var T' as return type: lineCg(p, cpsStmts, "$1 = $2;$n", [rdLoc(dest), rdLoc(src)]) return - var ty = skipTypes(dest.t, abstractVarRange) + var ty = skipTypes(dest.t, abstractRange) case ty.kind of tyRef: genRefAssign(p, dest, src, flags) @@ -282,7 +282,7 @@ proc genAssignment(p: BProc, dest, src: TLoc, flags: TAssignmentFlags) = else: lineCg(p, cpsStmts, "$1 = $2;$n", [rdLoc(dest), rdLoc(src)]) of tyPtr, tyPointer, tyChar, tyBool, tyEnum, tyCString, - tyInt..tyUInt64, tyRange: + tyInt..tyUInt64, tyRange, tyVar: lineCg(p, cpsStmts, "$1 = $2;$n", [rdLoc(dest), rdLoc(src)]) else: InternalError("genAssignment(" & $ty.kind & ')') diff --git a/compiler/cgen.nim b/compiler/cgen.nim index ffd9babde..0e0962936 100755 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -271,7 +271,7 @@ proc resetLoc(p: BProc, loc: var TLoc) = genObjectInit(p, cpsStmts, loc.t, loc, true) proc constructLoc(p: BProc, loc: TLoc, section = cpsStmts) = - if not isComplexValueType(skipTypes(loc.t, abstractVarRange)): + if not isComplexValueType(skipTypes(loc.t, abstractRange)): lineF(p, section, "$1 = 0;$n", [rdLoc(loc)]) else: lineF(p, section, "memset((void*)$1, 0, sizeof($2));$n", |