diff options
author | Juan Carlos <juancarlospaco@gmail.com> | 2021-05-22 08:12:30 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-22 13:12:30 +0200 |
commit | e12597589f2a8cdaabe09e8b2b92ff0fbe3727ef (patch) | |
tree | ea4b6af81dfe7008a006579f0b2c6d62d09dc7bc | |
parent | 9f7e2e30573a377770fa630f12a47bac09751282 (diff) | |
download | Nim-e12597589f2a8cdaabe09e8b2b92ff0fbe3727ef.tar.gz |
Error message minor (#18021)
* Update compiler/semtypes.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
-rw-r--r-- | compiler/lineinfos.nim | 2 | ||||
-rw-r--r-- | compiler/semtypes.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/lineinfos.nim b/compiler/lineinfos.nim index 47cddb888..bf81aed02 100644 --- a/compiler/lineinfos.nim +++ b/compiler/lineinfos.nim @@ -110,7 +110,7 @@ const warnFieldXNotSupported: "field '$1' not supported", warnRstStyle: "RST style: $1", warnCommentXIgnored: "comment '$1' ignored", - warnTypelessParam: "'$1' has no type. Typeless parameters are deprecated; only allowed for 'template'", + warnTypelessParam: "", # deadcode warnUseBase: "use {.base.} for base methods; baseless methods are deprecated", warnWriteToForeignHeap: "write to foreign heap", warnUnsafeCode: "unsafe code: '$1'", diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 97e37f8b7..84556ca1a 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -1297,7 +1297,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, "typeless parameters are obsolete") + localError(c.config, a.info, "parameter '$1' requires a type" % param.name.s) typ = errorType(c) let lifted = liftParamType(c, kind, genericParams, typ, arg.name.s, arg.info) |