summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorSirOlaf <34164198+SirOlaf@users.noreply.github.com>2023-09-02 20:42:40 +0200
committerGitHub <noreply@github.com>2023-09-02 20:42:40 +0200
commitd2f36c071b1967e864961f423596d3931e84e49b (patch)
treed32b7408a482d421a478c344250c48010c47fbde /compiler
parentbd6adbcc9d5a22f686eed7bc988a1c0b1b0a17e4 (diff)
downloadNim-d2f36c071b1967e864961f423596d3931e84e49b.tar.gz
Exclude block from endsInNoReturn, fix regression (#22632)
Co-authored-by: SirOlaf <>
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sem.nim2
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