summary refs log tree commit diff stats
path: root/compiler/semtempl.nim
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-05-21 21:31:40 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-05-21 21:31:40 +0200
commitf94ec363abf5b1393014a0bca7202c405512cddd (patch)
tree54f54dfe076dfa9e70af430521c574517edddb7d /compiler/semtempl.nim
parent68b5e3e3fe8c4bf314d31d18c147650db99b4f7d (diff)
downloadNim-f94ec363abf5b1393014a0bca7202c405512cddd.tar.gz
Allow void macro result (#11286)
* allow void macro result
* add test for void macro result type
Diffstat (limited to 'compiler/semtempl.nim')
-rw-r--r--compiler/semtempl.nim5
1 files changed, 0 insertions, 5 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index 2cbbd7b54..7a56f8c45 100644
--- a/compiler/semtempl.nim
+++ b/compiler/semtempl.nim
@@ -606,11 +606,6 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
       if n.sons[genericParamsPos].kind == nkEmpty:
         # we have a list of implicit type parameters:
         n.sons[genericParamsPos] = gp
-    # no explicit return type? -> use tyTyped
-    if n.sons[paramsPos].sons[0].kind == nkEmpty:
-      # use ``stmt`` as implicit result type
-      s.typ.sons[0] = newTypeS(tyTyped, c)
-      s.typ.n.sons[0] = newNodeIT(nkType, n.info, s.typ.sons[0])
   else:
     s.typ = newTypeS(tyProc, c)
     # XXX why do we need tyTyped as a return type again?