From 71026cec6e28d89677be0b5b3db4f8f79ee4bb3e Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 16 Feb 2017 00:43:14 +0100 Subject: fixes #5383 --- compiler/transf.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/transf.nim') diff --git a/compiler/transf.nim b/compiler/transf.nim index 13c6dd8fe..cbd1f15e3 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -869,7 +869,10 @@ proc transform(c: PTransf, n: PNode): PTransNode = else: result = transformSons(c, n) of nkIdentDefs, nkConstDef: - result = transformSons(c, n) + result = n.PTransNode + #transformSons(c, n) + let L = n.len-1 + result[L] = transform(c, n.sons[L]) # XXX comment handling really sucks: if importantComments(): PNode(result).comment = n.comment -- cgit 1.4.1-2-gfad0