parent
d8488e41e8
commit
037715285c
2 changed files with 6 additions and 1 deletions
|
|
@ -1295,7 +1295,7 @@ proc semProcTypeNode(c: PContext, n, genericParams: PNode,
|
||||||
let param = strTableGet(c.signatures, arg.name)
|
let param = strTableGet(c.signatures, arg.name)
|
||||||
if param != nil: typ = param.typ
|
if param != nil: typ = param.typ
|
||||||
else:
|
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)
|
typ = errorType(c)
|
||||||
let lifted = liftParamType(c, kind, genericParams, typ,
|
let lifted = liftParamType(c, kind, genericParams, typ,
|
||||||
arg.name.s, arg.info)
|
arg.name.s, arg.info)
|
||||||
|
|
|
||||||
5
tests/errmsgs/t18327.nim
Normal file
5
tests/errmsgs/t18327.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
discard """
|
||||||
|
errormsg: "parameter 'n' requires a type"
|
||||||
|
"""
|
||||||
|
|
||||||
|
proc fn3(n) = discard
|
||||||
Loading…
Add table
Add a link
Reference in a new issue