Skip to content

cgen: fix inline if expression returning closure (fixes #26595)#26672

Open
kbkpbot wants to merge 1 commit intovlang:masterfrom
kbkpbot:fix-issue-26595
Open

cgen: fix inline if expression returning closure (fixes #26595)#26672
kbkpbot wants to merge 1 commit intovlang:masterfrom
kbkpbot:fix-issue-26595

Conversation

@kbkpbot
Copy link
Copy Markdown
Contributor

@kbkpbot kbkpbot commented Mar 1, 2026

Fixed a bug where inline if expressions could not return a closure when:

  • Local variables are declared in the if block before the closure literal
  • The else branch returns an existing function-pointer variable

The fix ensures that function pointer types in if expressions are generated correctly, using inline function pointer declarations instead of relying on typedefs that may not exist for closure-specific type names.

Fixed by iFlow glm-5

Fixed a bug where inline if expressions could not return a closure when:
- Local variables are declared in the if block before the closure literal
- The else branch returns an existing function-pointer variable

The fix ensures that function pointer types in if expressions are generated
correctly, using inline function pointer declarations instead of relying on
typedefs that may not exist for closure-specific type names.

Co-authored-by: iFlow CLI <iflow@anthropic.com>
@medvednikov medvednikov closed this Mar 2, 2026
@medvednikov medvednikov reopened this Mar 2, 2026
@medvednikov
Copy link
Copy Markdown
Member

CI is green on master.

@medvednikov medvednikov closed this Mar 9, 2026
@medvednikov medvednikov reopened this Mar 9, 2026
@medvednikov medvednikov reopened this Mar 15, 2026
@JalonSolov JalonSolov closed this Mar 15, 2026
@JalonSolov JalonSolov reopened this Mar 15, 2026
@JalonSolov
Copy link
Copy Markdown
Collaborator

Looks like the failures (most of them, anyway) are related to this change.

@JalonSolov
Copy link
Copy Markdown
Collaborator

Another bounce...

@JalonSolov JalonSolov closed this Mar 21, 2026
@JalonSolov JalonSolov reopened this Mar 21, 2026
@medvednikov medvednikov force-pushed the master branch 2 times, most recently from cdf4550 to 4dc97d9 Compare March 22, 2026 10:27
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.

3 participants