* followup #17777: declaredloc field error msgs now work with generics * fix tests * cleanup
This commit is contained in:
parent
a266c54921
commit
065243dc59
3 changed files with 33 additions and 17 deletions
|
|
@ -2,6 +2,11 @@
|
|||
import std/strutils
|
||||
import options, ast, msgs
|
||||
|
||||
proc typSym*(t: PType): PSym =
|
||||
result = t.sym
|
||||
if result == nil and t.kind == tyGenericInst: # this might need to be refined
|
||||
result = t[0].sym
|
||||
|
||||
proc addDeclaredLoc*(result: var string, conf: ConfigRef; sym: PSym) =
|
||||
result.add " [$1 declared in $2]" % [sym.kind.toHumanStr, toFileLineCol(conf, sym.info)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue