Destructors: more moves for tuples (#9808)

This commit is contained in:
cooldome 2018-11-27 17:59:21 +00:00 • committed by Andreas Rumpf
commit 5b98afb8a8
4 changed files with 13 additions and 4 deletions

View file

@ -204,7 +204,7 @@ proc newSymG*(kind: TSymKind, n: PNode, c: PContext): PSym =
if n.kind == nkSym:
# and sfGenSym in n.sym.flags:
result = n.sym
if result.kind != kind:
if result.kind notin {kind, skTemp}:
localError(c.config, n.info, "cannot use symbol of kind '" &
$result.kind & "' as a '" & $kind & "'")
if sfGenSym in result.flags and result.kind notin {skTemplate, skMacro, skParam}: