Skip to content

Commit

Permalink
assert() -> doAssert()
Browse files Browse the repository at this point in the history
  • Loading branch information
stefantalpalaru committed Mar 13, 2019
1 parent ee58655 commit cb9b673
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions std_shims/macros_shim.nim
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ iterator recordFields*(typeImpl: NimNode): FieldDescription =
traversalStack.add (childNode, 0, currentCaseField, currentCaseBranch)

while true:
assert traversalStack.len > 0
doAssert traversalStack.len > 0

var stackTop = traversalStack[^1]
let recList = stackTop.currentNode
Expand All @@ -68,12 +68,12 @@ iterator recordFields*(typeImpl: NimNode): FieldDescription =
of nnkElse:
recuseInto branch[0]
else:
assert false
doAssert false

continue

of nnkRecCase:
assert n.len > 0
doAssert n.len > 0
for i in countdown(n.len - 1, 1):
let branch = n[i]
case branch.kind
Expand All @@ -82,7 +82,7 @@ iterator recordFields*(typeImpl: NimNode): FieldDescription =
of nnkElse:
recuseInto branch[0], n[0], branch
else:
assert false
doAssert false

recuseInto newTree(nnkRecCase, n[0])
continue
Expand Down Expand Up @@ -110,7 +110,7 @@ iterator recordFields*(typeImpl: NimNode): FieldDescription =
discard

else:
assert false
doAssert false

if traversalStack.len == 0: break

Expand Down

0 comments on commit cb9b673

Please sign in to comment.