Skip to content
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

Resolve return type of orelse with block on RHS (with return) #2084

Merged
merged 3 commits into from
Nov 17, 2024

Conversation

7phs
Copy link
Contributor

@7phs 7phs commented Nov 12, 2024

Fixes completion issues for cases with orelse and return (or block) expressions.

Currently, only the right side of an orelse expression is analyzed, which lacks type information in cases where orelse is used with block (return inside). This PR addresses the issue by ensuring that the left side of the expression is also analyzed.

This fix resolves issue #1989 .

@7phs 7phs force-pushed the resolve-orelse-with-return branch 2 times, most recently from 3cd6dfa to f294431 Compare November 13, 2024 23:42
src/analysis.zig Outdated Show resolved Hide resolved
@7phs 7phs force-pushed the resolve-orelse-with-return branch from f294431 to 7df0b48 Compare November 17, 2024 07:21
@7phs 7phs requested a review from Techatrix November 17, 2024 07:27
@Techatrix Techatrix merged commit 5067f6d into zigtools:master Nov 17, 2024
6 checks passed
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