Skip to content

Fix tuple_fetch with nonempty negative - #15492

Closed
lukaszsamson wants to merge 1 commit into
elixir-lang:mainfrom
lukaszsamson:ls-tuple-fetch
Closed

Fix tuple_fetch with nonempty negative#15492
lukaszsamson wants to merge 1 commit into
elixir-lang:mainfrom
lukaszsamson:ls-tuple-fetch

Conversation

@lukaszsamson

Copy link
Copy Markdown
Contributor

recompute optional? instead of trusting projected value when tuple_take_element flags found?.

Note that it adds another reduce over negs that the short path if tuple_pair_projection_keeps_full_fst?(negative, bdd), do: value, else: ... tried to avoid

Fixes #15491

Assisted-by: Claude Opus 4.8 & GPT 5.5

recompute `optional?` instead of trusting projected value when `tuple_take_element` flags `found?`
@lukaszsamson
lukaszsamson marked this pull request as draft June 23, 2026 07:54
@gldubc

gldubc commented Jul 24, 2026

Copy link
Copy Markdown
Member

The diagnostic and the fix are correct, but i don't believe there is need for a new function tuple_line_index_absent?, and since i rewrote the entire function in #15668, I opted for a conditional check on the final line on tuple_bdd_fetch_static.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Descr.tuple_fetch returns :badindex for valid access on difference types

3 participants