Skip to content

Disallow member access on conditional record fields (#505)#505

Closed
daniellerozenblit wants to merge 1 commit intofacebook:devfrom
daniellerozenblit:export-D96347373
Closed

Disallow member access on conditional record fields (#505)#505
daniellerozenblit wants to merge 1 commit intofacebook:devfrom
daniellerozenblit:export-D96347373

Conversation

@daniellerozenblit
Copy link
Contributor

@daniellerozenblit daniellerozenblit commented Mar 12, 2026

Summary:

Stack

The goal of this stack is to add support for conditional when blocks to sddl.

Diff

Add semantic analysis check to prevent member access (e.g., data.optional) on fields declared inside when blocks.

Conditional fields may or may not exist at runtime depending on the when condition, so allowing direct member access would lead to undefined behavior.

Reviewed By: Cyan4973

Differential Revision: D96347373

@meta-codesync
Copy link

meta-codesync bot commented Mar 12, 2026

@daniellerozenblit has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96347373.

daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 12, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 12, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 12, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 12, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
@meta-codesync meta-codesync bot changed the title Disallow member access on conditional fields Disallow member access on conditional record fields (#505) Mar 12, 2026
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 16, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 16, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 16, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 16, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 17, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 17, 2026
Summary:
Pull Request resolved: facebook#505

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Differential Revision: D96347373
Summary:

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Reviewed By: Cyan4973

Differential Revision: D96347373
daniellerozenblit added a commit to daniellerozenblit/openzl-1 that referenced this pull request Mar 18, 2026
Summary:

## Stack
The goal of this stack is to add support for conditional `when` blocks to sddl.

## Diff
Add semantic analysis check to prevent member access (e.g., `data.optional`) on fields declared inside `when` blocks.

Conditional fields may or may not exist at runtime depending on the `when` condition, so allowing direct member access would lead to undefined behavior.

Reviewed By: Cyan4973

Differential Revision: D96347373
@meta-codesync meta-codesync bot closed this in 0653f7b Mar 18, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 18, 2026

This pull request has been merged in 0653f7b.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant