Skip to content

Rust: doubly nested abbreviations break extraction #584

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

Closed
gebner opened this issue Apr 22, 2025 · 0 comments · Fixed by #594
Closed

Rust: doubly nested abbreviations break extraction #584

gebner opened this issue Apr 22, 2025 · 0 comments · Fixed by #594

Comments

@gebner
Copy link
Contributor

gebner commented Apr 22, 2025

module Rustabbrev2

type foo = { b: bool; }
type bar = { c: foo; }

let f (x: bool) = 0ul
let g (x: bar) = f x.c.b

let main_ () = g { c = { b = true } }

This fails with:

✔ [Monomorphization] ⏱️ 42ms
✔ [Inlining] ⏱️ 5ms
✔ [Pattern matches compilation] ⏱️ 4ms
✔ [Structs + Simplify 2] ⏱️ 6ms
✔ [Drop] ⏱️ <1ms
ERROR translating Rustabbrev2.g: Krml.Warn.Fatal("type mismatch;\n  e=@0\n  t=rustabbrev2::foo (verbose: (MiniRust.Name ([\"rustabbrev2\"; \"foo\"], [])))\n  t_ret=bool (verbose: (MiniRust.Constant <opaque>))\n  x=@0")

1 total errors
ERROR looking up: rustabbrev2::g
Fatal error: exception Not_found
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 a pull request may close this issue.

1 participant