fix: typo in enableInitializersExecution error message (#13553)
This PR fixes a typo in the error message thrown by `runInitAttrs` when initializer execution has not been enabled. The message previously referred to `enableInitializerExecution` (singular), but the actual function is `enableInitializersExecution` (plural). Reported on Zulip by Siddhartha Gadgil: https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Error.20in.20error.20message.20.28initializer.29/near/590973368 🤖 Prepared with Claude Code
This commit is contained in:
parent
2ad0f96d48
commit
87120c312e
1 changed files with 1 additions and 1 deletions
|
|
@ -159,7 +159,7 @@ def declareBuiltin (forDecl : Name) (value : Expr) : CoreM Unit :=
|
|||
@[export lean_run_init_attrs]
|
||||
private unsafe def runInitAttrs (env : Environment) (opts : Options) : IO Unit := do
|
||||
if !(← isInitializerExecutionEnabled) then
|
||||
throw <| IO.userError "`enableInitializerExecution` must be run before calling `importModules (loadExts := true)`"
|
||||
throw <| IO.userError "`enableInitializersExecution` must be run before calling `importModules (loadExts := true)`"
|
||||
-- **Note**: `ModuleIdx` is not an abbreviation, and we don't have instances for it.
|
||||
-- Thus, we use `(modIdx : Nat)`
|
||||
for mod in env.header.modules, (modIdx : Nat) in 0...* do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue