summary refs log tree commit diff stats
path: root/compiler/semtypinst.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-08 10:34:12 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-08 10:34:12 +0200
commitb47d9b7b917202ab3b7f1632f8d9462c5f76e869 (patch)
tree9b4c44ec1846c2ce276948ba37631cbef7e0ba26 /compiler/semtypinst.nim
parentcaa7f42e8e75e273ab3f52ada30aed4e06a817d9 (diff)
downloadNim-b47d9b7b917202ab3b7f1632f8d9462c5f76e869.tar.gz
fixes #4371
Diffstat (limited to 'compiler/semtypinst.nim')
-rw-r--r--compiler/semtypinst.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index 7ff33f918..922071ba3 100644
--- a/compiler/semtypinst.nim
+++ b/compiler/semtypinst.nim
@@ -162,7 +162,7 @@ proc replaceTypeVarsN(cl: var TReplTypeVars, n: PNode): PNode =
     discard
   of nkSym:
     result.sym = replaceTypeVarsS(cl, n.sym)
-    if result.sym.typ.kind == tyEmpty:
+    if result.sym.typ.kind == tyVoid:
       # don't add the 'void' field
       result = newNode(nkRecList, n.info)
   of nkRecWhen:
@@ -316,15 +316,15 @@ proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType =
 proc eraseVoidParams*(t: PType) =
   # transform '(): void' into '()' because old parts of the compiler really
   # don't deal with '(): void':
-  if t.sons[0] != nil and t.sons[0].kind == tyEmpty:
+  if t.sons[0] != nil and t.sons[0].kind == tyVoid:
     t.sons[0] = nil
 
   for i in 1 .. <t.sonsLen:
     # don't touch any memory unless necessary
-    if t.sons[i].kind == tyEmpty:
+    if t.sons[i].kind == tyVoid:
       var pos = i
       for j in i+1 .. <t.sonsLen:
-        if t.sons[j].kind != tyEmpty:
+        if t.sons[j].kind != tyVoid:
           t.sons[pos] = t.sons[j]
           t.n.sons[pos] = t.n.sons[j]
           inc pos