diff options
author | SirOlaf <34164198+SirOlaf@users.noreply.github.com> | 2023-09-02 20:42:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-02 20:42:40 +0200 |
commit | d2f36c071b1967e864961f423596d3931e84e49b (patch) | |
tree | d32b7408a482d421a478c344250c48010c47fbde /compiler | |
parent | bd6adbcc9d5a22f686eed7bc988a1c0b1b0a17e4 (diff) | |
download | Nim-d2f36c071b1967e864961f423596d3931e84e49b.tar.gz |
Exclude block from endsInNoReturn, fix regression (#22632)
Co-authored-by: SirOlaf <>
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sem.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sem.nim b/compiler/sem.nim index 7a49def53..1a080f869 100644 --- a/compiler/sem.nim +++ b/compiler/sem.nim @@ -220,7 +220,7 @@ proc endsInNoReturn(n: PNode): bool = var it = n # skip these beforehand, no special handling needed - while it.kind in {nkStmtList, nkStmtListExpr, nkBlockStmt} and it.len > 0: + while it.kind in {nkStmtList, nkStmtListExpr} and it.len > 0: it = it.lastSon case it.kind |