Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/Lean/Environment.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1357,11 +1357,9 @@ def asyncMayModify (ext : EnvExtension σ) (env : Environment) (asyncDecl : Name
-- common case of confusing `mainEnv` and `asyncEnv`.
| .async .mainEnv => ctx.mayContain asyncDecl && ctx.declPrefix != asyncDecl
-- The async env's async context should either be `asyncDecl` itself or `asyncDecl` is a nested
-- declaration that is not itself async. Note: we use `.all` rather than `.any` to also allow
-- modifying state for nested declarations that haven't been added to `asyncConsts` yet (e.g.,
-- `let rec` declarations with docstrings within `where` clauses).
-- declaration that is not itself async.
| .async .asyncEnv => ctx.declPrefix == asyncDecl ||
(ctx.mayContain asyncDecl && (env.findAsyncConst? asyncDecl).all (·.exts?.isNone))
(ctx.mayContain asyncDecl && (env.findAsyncConst? asyncDecl).any (·.exts?.isNone))
| _ => true

/--
Expand Down
28 changes: 0 additions & 28 deletions tests/lean/run/issue11799.lean

This file was deleted.

Loading