diff options
Diffstat (limited to 'lib/std/jsonutils.nim')
-rw-r--r-- | lib/std/jsonutils.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/jsonutils.nim b/lib/std/jsonutils.nim index 847761e2f..b1025d24b 100644 --- a/lib/std/jsonutils.nim +++ b/lib/std/jsonutils.nim @@ -95,7 +95,7 @@ macro getDiscriminants(a: typedesc): seq[string] = result = quote do: seq[string].default else: - doAssert false, "unexpected kind: " & $t2.kind + raiseAssert "unexpected kind: " & $t2.kind macro initCaseObject(T: typedesc, fun: untyped): untyped = ## does the minimum to construct a valid case object, only initializing @@ -109,7 +109,7 @@ macro initCaseObject(T: typedesc, fun: untyped): untyped = case t.kind of nnkObjectTy: t2 = t[2] of nnkRefTy: t2 = t[0].getTypeImpl[2] - else: doAssert false, $t.kind # xxx `nnkPtrTy` could be handled too + else: raiseAssert $t.kind # xxx `nnkPtrTy` could be handled too doAssert t2.kind == nnkRecList result = newTree(nnkObjConstr) result.add sym @@ -289,7 +289,7 @@ proc fromJson*[T](a: var T, b: JsonNode, opt = Joptions()) = i.inc else: # checkJson not appropriate here - static: doAssert false, "not yet implemented: " & $T + static: raiseAssert "not yet implemented: " & $T proc jsonTo*(b: JsonNode, T: typedesc, opt = Joptions()): T = ## reverse of `toJson` |