Skip to content

another refinement of ?. semantics - #7704

Open
mccanne wants to merge 1 commit into
mainfrom
noneish-dot-missing
Open

mccanne wants to merge 1 commit into
mainfrom
noneish-dot-missing

Conversation

@mccanne

@mccanne mccanne commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Make ?. turn a missing field into none, so this?.right?.color ?? "unpainted" works after a left join. Errors still pass through, and a field no type can have is still a compile error.

The checker now types outer join output with the unmatched side as possibly missing, and anti join output as {left} only. So a bare right.color after a left join is flagged.

The "field may be missing" error now suggests ok() or ?.. Updates the none/missing docs, adds runtime/ztests/expr/noneish-dot-missing.yaml, and updates join-expr.yaml for the new check.

Make ?. turn a missing field into none, so this?.right?.color ?? "unpainted"
works after a left join. Errors still pass through, and a field no type can
have is still a compile error.

The checker now types outer join output with the unmatched side as possibly
missing, and anti join output as {left} only. So a bare right.color after a
left join is flagged.

The "field may be missing" error now suggests ok() or ?.. Updates the
none/missing docs, adds runtime/ztests/expr/noneish-dot-missing.yaml,
and updates join-expr.yaml for the new check.
@mccanne

mccanne commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

This depends on #7703

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.

2 participants