Skip to content

[Backport releases/v4.32.0] fix: avoid compiler panic when deriving computable Inhabited in a noncomputable section#14128

Merged
Kha merged 1 commit into
releases/v4.32.0from
backport-14125-to-releases/v4.32.0
Jun 21, 2026
Merged

[Backport releases/v4.32.0] fix: avoid compiler panic when deriving computable Inhabited in a noncomputable section#14128
Kha merged 1 commit into
releases/v4.32.0from
backport-14125-to-releases/v4.32.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport 0a0e533 from #14125.

…noncomputable section` (#14125)

This PR fixes a compiler panic that occurred when deriving a computable
`Inhabited` instance for a type inside a `noncomputable section`.

The derived auxiliary default function was added to the environment but
not compiled, while the still-computable instance referencing it was
compiled, hitting an `unreachable!` in the `ExplicitBoxing` LCNF pass.
The aux function is now always compiled like a regular `def`,
suppressing errors in a `noncomputable section` so that a default
depending on noncomputable code marks the aux (and hence the instance
built from it) noncomputable instead of leaving it uncompiled while the
computable instance still references it.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 0a0e533)
@github-actions github-actions Bot requested a review from kim-em as a code owner June 19, 2026 18:45
@Kha Kha merged commit 8c9756b into releases/v4.32.0 Jun 21, 2026
7 of 8 checks passed
@Kha Kha deleted the backport-14125-to-releases/v4.32.0 branch June 21, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant