summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/semtypes.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index c41727b10..f3a76913d 100755
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -856,7 +856,10 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType =
       result = s.typ
     else: 
       assignType(prev, s.typ)
-      prev.id = s.typ.id
+      # bugfix: keep the fresh id for aliases to integral types:
+      if s.typ.kind notin {tyBool, tyChar, tyInt..tyInt64, tyFloat..tyFloat128,
+                           tyUInt..tyUInt64}: 
+        prev.id = s.typ.id
       result = prev
   of nkSym:
     if n.sym.kind == skType and n.sym.typ != nil: