This commit is contained in:
flywind
2021-06-22 18:44:56 +08:00
committed by GitHub
parent d8488e41e8
commit 037715285c
2 changed files with 6 additions and 1 deletions

View File

@@ -1295,7 +1295,7 @@ proc semProcTypeNode(c: PContext, n, genericParams: PNode,
let param = strTableGet(c.signatures, arg.name)
if param != nil: typ = param.typ
else:
localError(c.config, a.info, "parameter '$1' requires a type" % param.name.s)
localError(c.config, a.info, "parameter '$1' requires a type" % arg.name.s)
typ = errorType(c)
let lifted = liftParamType(c, kind, genericParams, typ,
arg.name.s, arg.info)

5
tests/errmsgs/t18327.nim Normal file
View File

@@ -0,0 +1,5 @@
discard """
errormsg: "parameter 'n' requires a type"
"""
proc fn3(n) = discard