--declaredlocs now shows location for T instead of static in proc fn(a: static T) (#17795)
This commit is contained in:
parent
2abc936d51
commit
80df21d9a3
1 changed files with 4 additions and 1 deletions
|
|
@ -131,7 +131,10 @@ proc addDeclaredLocMaybe*(result: var string, conf: ConfigRef; sym: PSym) =
|
|||
addDeclaredLoc(result, conf, sym)
|
||||
|
||||
proc addDeclaredLoc*(result: var string, conf: ConfigRef; typ: PType) =
|
||||
let typ = typ.skipTypes(abstractInst - {tyRange})
|
||||
# xxx figure out how to resolve `tyGenericParam`, e.g. for
|
||||
# proc fn[T](a: T, b: T) = discard
|
||||
# fn(1.1, "a")
|
||||
let typ = typ.skipTypes(abstractInst + {tyStatic} - {tyRange})
|
||||
result.add " [$1" % typ.kind.toHumanStr
|
||||
if typ.sym != nil:
|
||||
result.add " declared in " & toFileLineCol(conf, typ.sym.info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue