summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-07-15 20:26:45 +0200
committerAraq <rumpf_a@web.de>2014-07-15 20:26:45 +0200
commitc14e7565f8a3ef49568ea4f9d13a68b3fb54efb3 (patch)
tree62f18ba70edf5cdf0aa50539065adb18d92f0fb5 /compiler/semexprs.nim
parentfd0e809934f78111f77f273f3edb39053757b97a (diff)
downloadNim-c14e7565f8a3ef49568ea4f9d13a68b3fb54efb3.tar.gz
fixes #1355
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r--compiler/semexprs.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 7f97124e1..7deb46af9 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -82,7 +82,8 @@ proc semSym(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode =
     case skipTypes(s.typ, abstractInst-{tyTypeDesc}).kind
     of  tyNil, tyChar, tyInt..tyInt64, tyFloat..tyFloat128, 
         tyTuple, tySet, tyUInt..tyUInt64:
-      result = inlineConst(n, s)
+      if s.magic == mNone: result = inlineConst(n, s)
+      else: result = newSymNode(s, n.info)
     of tyArrayConstr, tySequence:
       # Consider::
       #     const x = []