diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-08-12 00:24:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-11 18:24:46 +0200 |
commit | 3f7e1d7daadf4002da1a155d7b98ff7fcca9e2fa (patch) | |
tree | ca733c386244be34e2d0e53b8f79d4e2844b8794 /lib/impure/re.nim | |
parent | 48da472dd2e625d2d794907afd33a4a153fa2dc1 (diff) | |
download | Nim-3f7e1d7daadf4002da1a155d7b98ff7fcca9e2fa.tar.gz |
replace `doAssert false` with `raiseAssert` in lib, which works better with strictdefs (#22458)
Diffstat (limited to 'lib/impure/re.nim')
-rw-r--r-- | lib/impure/re.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/impure/re.nim b/lib/impure/re.nim index f97a31d21..5e84091c7 100644 --- a/lib/impure/re.nim +++ b/lib/impure/re.nim @@ -460,7 +460,7 @@ template `=~` *(s: string, pattern: Regex): untyped = elif line =~ re"\s*(\#.*)": # matches a comment # note that the implicit `matches` array is different from 1st branch result = $(matches[0],) - else: doAssert false + else: raiseAssert "unreachable" doAssert not declared(matches) doAssert parse("NAME = LENA") == """("NAME", "LENA")""" doAssert parse(" # comment ... ") == """("# comment ... ",)""" |