Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Conversation

@theofabilous
Copy link
Contributor

@theofabilous theofabilous commented Nov 26, 2025

Closes #220

_Static_asserts inside function bodies are rendered with a trailing semicolon, yielding syntactically invalid zig code.

Fixed by not appending a semicolon to static assertions in addSemicolonIfNeeded()

@steeve
Copy link
Contributor

steeve commented Nov 26, 2025

Dupe of 836ea03 (although it was somehow never merged into master ?)

@theofabilous
Copy link
Contributor Author

Dupe of 836ea03 (although it was somehow never merged into master ?)

Oops, I missed #220... I'll close this

@steeve
Copy link
Contributor

steeve commented Nov 26, 2025

Well, it was never merged on master so summoning @Vexu !

@Vexu
Copy link
Member

Vexu commented Nov 26, 2025

Looks like I accidentally dropped that commit on rebase. I'll use this if you rebase it after #252

@theofabilous
Copy link
Contributor Author

Looks like I accidentally dropped that commit on rebase. I'll use this if you rebase it after #252

Sounds good.

@theofabilous theofabilous reopened this Nov 26, 2025
@theofabilous theofabilous marked this pull request as draft November 26, 2025 16:13
@theofabilous theofabilous force-pushed the no-static-assert-semicolon branch from da73449 to 10ae2f6 Compare November 26, 2025 16:16
Co-authored-by: Veikka Tuominen <git@vexu.eu>
@theofabilous theofabilous force-pushed the no-static-assert-semicolon branch from 10ae2f6 to 51668a8 Compare November 26, 2025 16:36
@theofabilous
Copy link
Contributor Author

Rebased onto main now that #252 is merged. I also took the liberty of applying and squashing the _Static_assert test modifications in 836ea03 and added you as a co-author

@theofabilous theofabilous marked this pull request as ready for review November 26, 2025 16:39
@Vexu Vexu enabled auto-merge (rebase) November 26, 2025 16:46
@Vexu Vexu merged commit a8bd558 into ziglang:main Nov 26, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid Zig code generated on static_assert

3 participants