From 7ad13d98d90a717fca3b83491cd321bb22b06190 Mon Sep 17 00:00:00 2001 From: Vindaar Date: Wed, 3 Oct 2018 19:44:31 +0200 Subject: [PATCH] force vals in `quote do` to bool due to compile time when changes --- yaml/serialization.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yaml/serialization.nim b/yaml/serialization.nim index e7fdef2..5b73398 100644 --- a/yaml/serialization.nim +++ b/yaml/serialization.nim @@ -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)