Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine: F*: interface mode: dropped_body on associated constants of inherent impls #1131

Open
W95Psp opened this issue Nov 25, 2024 · 0 comments
Labels
bug Something isn't working engine Issue in the engine

Comments

@W95Psp
Copy link
Collaborator

W95Psp commented Nov 25, 2024

Consider a struct X and an inherent impl block for X, as follows:

struct X;
impl X {
    const A: u8 = 0;
}

A is an associated constant for X.

When extracted with interface flags on to F*, this results in a let binding with a dropped_body () body.

Why this is not normal:
The current policy is that constant items that are marked "extract type-only" are actually fully translated: extracting a constant almost never yields issues, and is almost always useful in proof settings.

Plausible explanation for this bug:
Here, this policy doesn't apply probably because associated constants in inherent impls are translated with c_expr instead of c_body in thir_export.ml.

@W95Psp W95Psp added bug Something isn't working engine Issue in the engine labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working engine Issue in the engine
Projects
None yet
Development

No branches or pull requests

1 participant