Skip to content

Sema: rewrite analyzeMinMax #23914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2025
Merged

Sema: rewrite analyzeMinMax #23914

merged 1 commit into from
May 18, 2025

Conversation

mlugg
Copy link
Member

@mlugg mlugg commented May 17, 2025

I only wanted to fix a bug originally, but this logic was kind of a rat's nest. But now... okay, it still is, but it's now a slightly more navigable nest, with cute little signs occasionally, painted by adorable rats desparately trying to follow the specification.

Hopefully #3806 comes along at some point to simplify this logic a little.

Resolves: #23139

@mlugg
Copy link
Member Author

mlugg commented May 17, 2025

Note that this fix probably shouldn't be backported to 0.14.1, because it's a full rewrite of semantic analysis of @min/@max so may well introduce its own bugs.

@mlugg mlugg enabled auto-merge (rebase) May 17, 2025 16:11
I only wanted to fix a bug originally, but this logic was kind of a
rat's nest. But now... okay, it still *is*, but it's now a slightly more
navigable nest, with cute little signs occasionally, painted by adorable
rats desparately trying to follow the specification.

Hopefully ziglang#3806 comes along at some point to simplify this logic a
little.

Resolves: ziglang#23139
@mlugg mlugg merged commit 07a5efd into ziglang:master May 18, 2025
9 checks passed
@mlugg mlugg deleted the better-minmax branch May 19, 2025 12:35
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.

Sema: incompatible types with @min which is supposed to accept arbitrary integer types
1 participant