Skip to content

Conversation

@xdBronch
Copy link
Contributor

No description provided.

@alexrp alexrp requested a review from mlugg November 13, 2025 17:59
src/Sema.zig Outdated
Comment on lines 16389 to 16393
if (outputs_len != 0 or
inputs_len != 0 or
extra.data.clobbers != .none or
is_volatile) unreachable; // already checked by AstGen

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an odd spelling of

Suggested change
if (outputs_len != 0 or
inputs_len != 0 or
extra.data.clobbers != .none or
is_volatile) unreachable; // already checked by AstGen
assert(outputs_len == 0); // validated by AstGen
assert(inputs_len == 0); // validated by AstGen
assert(extra.data.clobbers == .none); // validated by AstGen
assert(!is_volatile); // validated by AstGen

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(BTW, the advantage of splitting them up in the above rather than using or is that if one of the assertions fails, you'll see in the stack trace what the specific condition was)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah good point, i just kinda lazily edited the checks that were there before :p

@mlugg mlugg enabled auto-merge (rebase) November 14, 2025 11:56
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