Skip to content

fix: split infrastructure if-chains to prevent if-drop bug#134

Merged
cs01 merged 1 commit intomainfrom
fix/type-resolver-if-drop
Mar 9, 2026
Merged

fix: split infrastructure if-chains to prevent if-drop bug#134
cs01 merged 1 commit intomainfrom
fix/type-resolver-if-drop

Conversation

@cs01
Copy link
Owner

@cs01 cs01 commented Mar 9, 2026

Summary

  • Splits 3 infrastructure functions that exceeded the 4-branch if-return safety limit
  • getBuiltinAstTypeByName() in type-resolver.ts: 15 → 3 sub-functions (4 each) + 4-branch coordinator
  • llvmTypeToSymbolKind() in function-generator.ts: 9 → 2 sub-methods (4 each) + 3-branch coordinator
  • resolve() in type-context.ts: 9 → 2 sub-methods (4 each) + 4-branch coordinator
  • Prevents the native compiler's if-drop bug (5th+ consecutive if-return blocks silently dropped)

Test plan

  • All 434 tests pass
  • Self-hosting verification passes (verify:quick)

🤖 Generated with Claude Code

@cs01 cs01 merged commit f67444a into main Mar 9, 2026
12 checks passed
@cs01 cs01 deleted the fix/type-resolver-if-drop branch March 9, 2026 04:16
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.

1 participant