Mark definitions in a `noncomputable section` that fail to compile with `noncomputable` attribute
Open
@zwarich is already working on this.
Since Jun 27, 2025.
bug
P-medium
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Currently, definitions in a noncomputable section that fail to compile do not get marked with noncomputable. The current check for noncomputable in the toMono pass checks for the attribute, but there is a second check in the IR phase for definitions without any IR. This still catches most issues, but it is possible for the use of a noncomputable definition to be erroneously optimized away between these two checks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.