summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/sem.nim2
-rw-r--r--tests/exprs/t22604.nim13
2 files changed, 1 insertions, 14 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
diff --git a/tests/exprs/t22604.nim b/tests/exprs/t22604.nim
index 570f989d6..c41cd3dfa 100644
--- a/tests/exprs/t22604.nim
+++ b/tests/exprs/t22604.nim
@@ -10,19 +10,6 @@ for i in 0..<1:
       else:
         raiseAssert "Won't get here"
 
-# block
-for i in 0..<1:
-  let x =
-    case false
-    of true:
-      42
-    of false:
-      block:
-        if true:
-          continue
-        else:
-          raiseAssert "Won't get here"
-
 # nested case
 for i in 0..<1:
   let x =