'var T' for iterators

This commit is contained in:
Araq 2011-07-31 22:39:17 +02:00
commit 3e806a374a
7 changed files with 79 additions and 11 deletions

View file

@ -207,7 +207,7 @@ proc genAssignment(p: BProc, dest, src: TLoc, flags: TAssignmentFlags) =
# This function replaces all other methods for generating
# the assignment operation in C.
if src.t != nil and src.t.kind == tyPtr:
# little HACK to suppor the new 'var T' as return type:
# little HACK to support the new 'var T' as return type:
appcg(p, cpsStmts, "$1 = $2;$n", [rdLoc(dest), rdLoc(src)])
return
var ty = skipTypes(dest.t, abstractVarRange)