Skip to content

Fix unboxing EPA of wrong kind#2838

Merged
ncik-roberts merged 1 commit intooxcaml:mainfrom
Ekdohibs:fix-mixed-unboxing
Jul 24, 2024
Merged

Fix unboxing EPA of wrong kind#2838
ncik-roberts merged 1 commit intooxcaml:mainfrom
Ekdohibs:fix-mixed-unboxing

Conversation

@Ekdohibs
Copy link
Copy Markdown
Contributor

It still used a poison const independent of kind.
Was failing on:

type t =
  | A of float#
  | B

let evaluate () =
  let[@inline] get () =
    let p = if Sys.opaque_identity true then A (Sys.opaque_identity #4.0) else B in
    match p with
    | A x -> x
    | B   -> assert false
  in
  let x = get () in
  x
;;

@ncik-roberts ncik-roberts added bug Something isn't working flambda2 Prerequisite for, or part of, flambda2 labels Jul 23, 2024
@ncik-roberts
Copy link
Copy Markdown
Contributor

Thanks, I am cherry-picking it onto 5.1.1minus-19. I'd be in favor of adding the test case. Is there a reason to not do this?

@ncik-roberts
Copy link
Copy Markdown
Contributor

I spoke with @Ekdohibs , and we think the test overfits a bit too much to the failed rebase so I will merge.

@ncik-roberts ncik-roberts merged commit 1799be1 into oxcaml:main Jul 24, 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 flambda2 Prerequisite for, or part of, flambda2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants