summary refs log tree commit diff stats
path: root/compiler/nim.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-08-10 20:26:40 +0800
committerGitHub <noreply@github.com>2023-08-10 14:26:40 +0200
commit7be2e2bef545e68ac3d88876fe7073a033fbb5f4 (patch)
tree377a900fa6cdde8063bc8d234de04876381a7a9c /compiler/nim.nim
parent8523b543d6034d8545a4db256bff83b73c927033 (diff)
downloadNim-7be2e2bef545e68ac3d88876fe7073a033fbb5f4.tar.gz
replaces `doAssert false` with `raiseAssert` for unreachable branches, which works better with strictdefs (#22436)
replaces `doAssert false` with `raiseAssert`, which works better with strictdefs
Diffstat (limited to 'compiler/nim.nim')
-rw-r--r--compiler/nim.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/nim.nim b/compiler/nim.nim
index d05f01c42..d0aa888c4 100644
--- a/compiler/nim.nim
+++ b/compiler/nim.nim
@@ -140,7 +140,7 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
         # tasyncjs_fail` would fail, refs https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode
         if cmdPrefix.len == 0: cmdPrefix = findNodeJs().quoteShell
         cmdPrefix.add " --unhandled-rejections=strict"
-      else: doAssert false, $conf.backend
+      else: raiseAssert $conf.backend
       if cmdPrefix.len > 0: cmdPrefix.add " "
         # without the `cmdPrefix.len > 0` check, on windows you'd get a cryptic:
         # `The parameter is incorrect`