summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorNeelesh Chandola <neelesh.chandola@outlook.com>2019-01-15 12:38:12 +0530
committerAndreas Rumpf <rumpf_a@web.de>2019-01-15 08:08:12 +0100
commit8922063bd84e9109a5ba493188f201ebda74f66d (patch)
tree800ee91b97fad52607069ffb31573889334d40d9 /compiler/semstmts.nim
parentc8ba9ffdba9165b2c952f579005fdbb6871a1380 (diff)
downloadNim-8922063bd84e9109a5ba493188f201ebda74f66d.tar.gz
typed/untyped return type is invalid for everything except templates and macros (#10275)
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim3
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 12283e042..3fdbb85db 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1253,9 +1253,6 @@ proc semTypeSection(c: PContext, n: PNode): PNode =
 
 proc semParamList(c: PContext, n, genericParams: PNode, s: PSym) =
   s.typ = semProcTypeNode(c, n, genericParams, nil, s.kind)
-  if s.kind notin {skMacro, skTemplate}:
-    if s.typ.sons[0] != nil and s.typ.sons[0].kind == tyStmt:
-      localError(c.config, n.info, "invalid return type: 'stmt'")
 
 proc addParams(c: PContext, n: PNode, kind: TSymKind) =
   for i in countup(1, sonsLen(n)-1):