force vals in `quote do` to bool due to compile time when changes

This commit is contained in:
Vindaar 2018-10-03 19:44:31 +02:00 committed by flyx
parent 011c99270f
commit 7ad13d98d9
1 changed files with 2 additions and 2 deletions

View File

@ -985,11 +985,11 @@ macro genRepresentObject(t: typedesc, value, childTagStyle: typed): typed =
childAccessor = newDotExpr(value, newIdentNode(name))
result.add(quote do:
when `tSym` == -1 or `fieldIndex` notin transientVectors[`tSym`]:
when `isVO`: c.put(startMapEvent(yTagQuestionMark, yAnchorNone))
when bool(`isVO`): c.put(startMapEvent(yTagQuestionMark, yAnchorNone))
c.put(scalarEvent(`name`, if `childTagStyle` == tsNone:
yTagQuestionMark else: yTagNimField, yAnchorNone))
representChild(`childAccessor`, `childTagStyle`, c)
when `isVO`: c.put(endMapEvent())
when bool(`isVO`): c.put(endMapEvent())
)
inc(fieldIndex)