Skip to content

Sema: a contextual join whose demand a reported error poisoned is a cascade, not an internal error (#2313) - #2656

Merged
ehartford merged 1 commit into
fix-2354from
fix-2313
Oct 25, 2026
Merged

ehartford merged 1 commit into
fix-2354from
fix-2313

Conversation

@ehartford

@ehartford ehartford commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Root cause: the contextual join decision check (src/SemaCheck.w, the branch
that emits "internal error: conflicting contextual join decisions for one
expression"). After let b: [4]i32 = [1, 2] was refused (§4.3a), a re-check
of b[3] met its first decision (expected i32, final i32) with the demand
now <error> and the join settled at its default (isize), and reported
"(sig 355: first expected i32 [3] final i32 [3], now expected [0]
final isize [19])" beside the real error.

A decision whose demand, first or now, is the error type is the reported
error's cascade and returns without a second diagnostic; every other
disagreement is still the internal error.

Test: test/behavior/behav_2313_no_internal_error_after_user_error.w (checks
the program and requires the length error and no internal error).

Closes #2313

…ascade, not an internal error (#2313)

Root cause: the contextual join decision check (src/SemaCheck.w, the branch
that emits "internal error: conflicting contextual join decisions for one
expression"). After `let b: [4]i32 = [1, 2]` was refused (§4.3a), a re-check
of `b[3]` met its first decision (expected i32, final i32) with the demand
now `<error>` and the join settled at its default (isize), and reported
"(sig 355: first expected i32 [3] final i32 [3], now expected <error> [0]
final isize [19])" beside the real error.

A decision whose demand, first or now, is the error type is the reported
error's cascade and returns without a second diagnostic; every other
disagreement is still the internal error.

Test: test/behavior/behav_2313_no_internal_error_after_user_error.w (checks
the program and requires the length error and no internal error).
@ehartford
ehartford added this pull request to stack #2658 October 25, 2026 21:47
@ehartford ehartford changed the title fix 2313 Sema: a contextual join whose demand a reported error poisoned is a cascade, not an internal error (#2313) Oct 25, 2026
@ehartford
ehartford marked this pull request as ready for review October 25, 2026 21:59
@ehartford
ehartford merged commit 64255f0 into main Oct 25, 2026
@ehartford
ehartford deleted the fix-2313 branch October 25, 2026 21:59
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 this pull request may close these issues.

Internal error 'conflicting contextual join decisions' after an array-length mismatch error

1 participant