replaces doAssert false with raiseAssert for unreachable branches, which works better with strictdefs (#22436)

replaces `doAssert false` with `raiseAssert`, which works better with strictdefs
This commit is contained in:
ringabout
2023-08-10 20:26:40 +08:00
committed by GitHub
parent 8523b543d6
commit 7be2e2bef5
21 changed files with 34 additions and 42 deletions

View File

@@ -240,7 +240,7 @@ proc runNimScript*(cache: IdentCache; scriptName: AbsoluteFile;
of gcAtomicArc:
defineSymbol(conf.symbols, "gcatomicarc")
else:
doAssert false, "unreachable"
raiseAssert "unreachable"
# ensure we load 'system.nim' again for the real non-config stuff!
resetSystemArtifacts(graph)