* Fix #14325
* Refactor and fix
This commit is contained in:
Clyybber 2021-03-11 14:03:25 +01:00 • committed by GitHub
commit 3cbc80045d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 32 deletions

View file

@ -1143,9 +1143,9 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
gcomma(g, n)
put(g, tkParRi, ")")
of nkObjDownConv, nkObjUpConv:
let typ = if (n.typ != nil) and (n.typ.sym != nil): n.typ.sym.name.s else: ""
put(g, tkParLe, typ & "(")
if n.len >= 1: gsub(g, n[0])
put(g, tkParLe, "(")
gcomma(g, n, 1)
put(g, tkParRi, ")")
of nkClosedSymChoice, nkOpenSymChoice:
if renderIds in g.flags: