summary refs log tree commit diff stats
path: root/compiler/vmgen.nim
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2014-04-20 21:54:59 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2014-04-20 21:55:45 +0100
commit57cc8237f72b26cb56f8f250e382f8a0e091aea1 (patch)
treeb11c108783ff84e78d8b594d33decea52713c8e9 /compiler/vmgen.nim
parent36fc1d9d72b91a632b795b656a5ead52b472036f (diff)
downloadNim-57cc8237f72b26cb56f8f250e382f8a0e091aea1.tar.gz
Fixes #1093.
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r--compiler/vmgen.nim10
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index 7c0c3d4f5..dbb63e166 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -316,15 +316,7 @@ proc genAndOr(c: PCtx; n: PNode; opc: TOpcode; dest: var TDest) =
   c.patch(L1)
 
 proc canonValue*(n: PNode): PNode =
-  if n.kind == nkExprColonExpr:
-    result = n.sons[1]
-  elif n.hasSubnodeWith(nkExprColonExpr):
-    result = n.copyNode
-    newSeq(result.sons, n.len)
-    for i in 0.. <n.len:
-      result.sons[i] = canonValue(n.sons[i])
-  else:
-    result = n
+  result = n
 
 proc rawGenLiteral(c: PCtx; n: PNode): int =
   result = c.constants.len