From 7be2e2bef545e68ac3d88876fe7073a033fbb5f4 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 10 Aug 2023 20:26:40 +0800 Subject: replaces `doAssert false` with `raiseAssert` for unreachable branches, which works better with strictdefs (#22436) replaces `doAssert false` with `raiseAssert`, which works better with strictdefs --- compiler/nim.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/nim.nim') 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` -- cgit 1.4.1-2-gfad0