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
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
Member

CI is green on master.

@medvednikov medvednikov closed this Mar 9, 2026
@medvednikov medvednikov reopened this Mar 9, 2026
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