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

Fix Flambda 2 typing for immutable arrays #1457

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Meet
  • Loading branch information
lthls committed Jun 7, 2023
commit 931ab91b9456e439a6c25d77bb7d7605ddfa59ac
10 changes: 9 additions & 1 deletion middle_end/flambda2/types/meet_and_join.ml
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,15 @@ and meet_array_contents env (array_contents1 : TG.array_contents Or_unknown.t)
let<* field, env_extension =
match meet_element_kind with
| Bottom -> Bottom
| Unknown -> (* TBD *)
| Unknown ->
(* If the meet of the kinds is Unknown, then both inputs had
Unknown kinds. I don't see how we could end up with an
array type where the contents are known but we don't know
the kind, but in that case we wouldn't be able to call
meet because the two sides may have differet kinds. So
we'll just return the first input, which is guaranteed to
be a correct approximation of the meet. *)
Ok (field1, TEE.empty)
| Ok _ -> meet env field1 field2
in
let<+ env_extension =
Expand Down