improve errmsg refs #17793 object ctor with generics (#17806)

This commit is contained in:
Timothee Cour 2021-04-21 01:52:17 -07:00 • committed by GitHub
commit 2951f89374
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -130,7 +130,7 @@ proc addDeclaredLocMaybe*(result: var string, conf: ConfigRef; sym: PSym) =
if optDeclaredLocs in conf.globalOptions and sym != nil:
addDeclaredLoc(result, conf, sym)
proc addDeclaredLoc(result: var string, conf: ConfigRef; typ: PType) =
proc addDeclaredLoc*(result: var string, conf: ConfigRef; typ: PType) =
let typ = typ.skipTypes(abstractInst - {tyRange})
result.add " [$1" % typ.kind.toHumanStr
if typ.sym != nil: