* fix

* minor
This commit is contained in:
flywind
2020-10-31 19:06:13 +08:00
committed by GitHub
parent 8115b655e7
commit 80b0748d75
2 changed files with 19 additions and 0 deletions

View File

@@ -1927,6 +1927,7 @@ proc genRepr(p: PProc, n: PNode, r: var TCompRes) =
genReprAux(p, n, r, "reprJSONStringify")
else:
genReprAux(p, n, r, "reprAny", genTypeInfo(p, t))
r.kind = resExpr
proc genOf(p: PProc, n: PNode, r: var TCompRes) =
var x: TCompRes

View File

@@ -0,0 +1,18 @@
type
Enum = enum A
let
enumVal = A
tmp = if true: $enumVal else: $enumVal
let
intVal = 12
tmp2 = if true: repr(intVal) else: $enumVal
let
strVal = "123"
tmp3 = if true: repr(strVal) else: $strVal
let
floatVal = 12.4
tmp4 = if true: repr(floatVal) else: $floatVal