Files
lean4/tests/elab_fail/forErrors.lean
Sebastian Graf 40e8f4c5fb chore: turn on new do elaborator in Core (#12656)
This PR turns on the new `do` elaborator in Init, Lean, Std, Lake and
the testsuite.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 12:38:33 +00:00

8 lines
241 B
Lean4
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
set_option backward.do.legacy false
def g (xs ys : List Nat) (a : α) : IO Nat := do
let mut sum := 0
for x in xs, y in ys, c in a, z in ys do
sum := x + sum
IO.println s!"x: {x}, y: {y}, a: {a}, c: {c}, sum: {sum}"
return sum