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

Trait inheritance not supported #111

Open
karthikbhargavan opened this issue Dec 17, 2024 · 1 comment
Open

Trait inheritance not supported #111

karthikbhargavan opened this issue Dec 17, 2024 · 1 comment

Comments

@karthikbhargavan
Copy link
Contributor

karthikbhargavan commented Dec 17, 2024

Code of the following form does not appear to be supported.
At least we see a case where this does not work in libcrux.

trait A {...}
trait B : Copy + Clone+ A {...}

impl A for u8 {...}
impl B for u9 {...}

This kind of pattern gives a KaRaMeL error of the form:

Cannot re-check libcrux_ml_kem.ind_cca.instantiations.portable.unpacked.keypair_from_private_key as valid Low* and will not extract it.  If libcrux_ml_kem.ind_cca.instantiations.portable.unpacked.keypair_from_private_key is not meant to be extracted, consider marking it as Ghost, noextract, or using a bundle. If it is meant to be extracted, use -dast for further debugging.

I can create a more detailed repro later, or maybe there already is one in some other issue

@msprotz
Copy link
Contributor

msprotz commented Dec 23, 2024

There is already support for trait inheritance (because it's been used elsewhere), so I would need a repro to look at this. Thanks!

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

No branches or pull requests

2 participants