summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-09-21 20:19:39 +0200
committerAraq <rumpf_a@web.de>2012-09-21 20:19:39 +0200
commite605b22ccfbb050c50354b648973a0ecf1fa4593 (patch)
treee46343c2361972a2e8de571b578b115b59065523 /compiler
parent505f179515fb8f0aa2ac15cb54af8c206f3eddda (diff)
downloadNim-e605b22ccfbb050c50354b648973a0ecf1fa4593.tar.gz
bugfix: typeinfo generation (2)
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/ccgtypes.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index d99740ed4..7a254e867 100755
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -904,8 +904,9 @@ proc genTypeInfo(m: BModule, typ: PType): PRope =
     discard cgsym(m, "TNimNode")
     appf(m.s[cfsVars], "extern TNimType $1; /* $2 */$n", 
          [result, toRope(typeToString(t))])
-    return con("&", result)
-  if ContainsOrIncl(m.typeInfoMarker, t.id): return con("&", result)
+    return con("(&".toRope, result, ")".toRope)
+  if ContainsOrIncl(m.typeInfoMarker, t.id):
+    return con("(&".toRope, result, ")".toRope)
   case t.kind
   of tyEmpty: result = toRope"0"
   of tyPointer, tyBool, tyChar, tyCString, tyString, tyInt..tyUInt64, tyVar:
@@ -932,7 +933,7 @@ proc genTypeInfo(m: BModule, typ: PType): PRope =
     # results are not deterministic!
     genTupleInfo(m, t, result)
   else: InternalError("genTypeInfo(" & $t.kind & ')')
-  result = con("&", result)
+  result = con("(&".toRope, result, ")".toRope)
 
 proc genTypeSection(m: BModule, n: PNode) = 
   nil