diff options
author | Araq <rumpf_a@web.de> | 2015-07-05 14:02:51 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-07-05 15:00:47 +0200 |
commit | 36ca2f1102243500973780ba61f13c078a167634 (patch) | |
tree | 3110a49c840289d80ad68e48e9e2a780fbb124ec /compiler | |
parent | 7011275f1341b463de07902f6c6909bc841a53d4 (diff) | |
download | Nim-36ca2f1102243500973780ba61f13c078a167634.tar.gz |
fixes #3051
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index a56df9502..886f9458d 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1369,7 +1369,7 @@ proc semProcBody(c: PContext, n: PNode): PNode = c.p.resultSym != nil and c.p.resultSym.typ.isMetaType: if isEmptyType(result.typ): # we inferred a 'void' return type: - c.p.resultSym.typ = nil + c.p.resultSym.typ = errorType(c) c.p.owner.typ.sons[0] = nil else: localError(c.p.resultSym.info, errCannotInferReturnType) |