Skip to content

Commit 9c2009e

Browse files
committed
Accept loops without mutation.
1 parent bf9a7e4 commit 9c2009e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

engine/lib/phases/phase_functionalize_loops.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,7 @@ struct
345345
UB.call fold_operator
346346
[ condition; invariant; variant; init; body ]
347347
span (dty span expr.typ)
348-
| Loop { state = None; _ } ->
349-
Error.unimplemented ~issue_id:405 ~details:"Loop without mutation"
350-
span
348+
| Loop { state = None; _ } -> UB.unit_expr span
351349
| Loop _ ->
352350
Error.unimplemented ~issue_id:933 ~details:"Unhandled loop kind" span
353351
| [%inline_arms "dexpr'.*" - Loop - Break - Continue - Return] ->

0 commit comments

Comments
 (0)