You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some combinations of if statements, for loops, let declarations and mutation inside of a do block, the error unexpected error while elaborating 'let' is produced.
Example
example (arr : Array Nat) : Unit := Id.run dolet mut abc := 0if0 = 0then
()
for (i, j) in [(0, 0)] do-- unexpected error when elaborating 'let'let a : Nat := i + 2if h : arr.size ≤ 4then
continue
elseif h : arr[4] ≤ a then
continue
elseif0 = 0then
continue
abc := 0
If you change the last part to
let b := arr[0]
if b = 0then
continue
abc := ()
then the error goes away.
Versions
Lean 4.16.0-nightly-2024-12-20 (on live.lean-lang.org)
Lean 4.14.0-rc2
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
For some combinations of if statements, for loops, let declarations and mutation inside of a do block, the error
unexpected error while elaborating 'let'
is produced.Example
If you change the last part to
then the error goes away.
Versions
Lean 4.16.0-nightly-2024-12-20 (on live.lean-lang.org)
Lean 4.14.0-rc2
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: