const view types; fixes some cases from https://github.com/nim-lang/Nim/issues/15428 (#15488)

This commit is contained in:
Andreas Rumpf 2020-10-05 18:31:46 +02:00 • committed by GitHub
commit 4e438f9096
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 94 additions and 47 deletions

View file

@ -591,10 +591,17 @@ proc value(this: var DebugPrinter; value: PNode) =
if this.conf != nil:
this.key "info"
this.value $lineInfoToStr(this.conf, value.info)
if card(value.flags) > 0:
if value.flags != {}:
this.key "flags"
this.value value.flags
if value.typ != nil:
this.key "typ"
this.value value.typ.kind
else:
this.key "typ"
this.value "nil"
case value.kind
of nkCharLit..nkUInt64Lit:
this.key "intVal"