Skip to content

fix: add null checks for getInterface() before getAllInterfaceFields()#156

Merged
cs01 merged 1 commit intomainfrom
fix/null-getInterface-checks
Mar 9, 2026
Merged

fix: add null checks for getInterface() before getAllInterfaceFields()#156
cs01 merged 1 commit intomainfrom
fix/null-getInterface-checks

Conversation

@cs01
Copy link
Owner

@cs01 cs01 commented Mar 9, 2026

Summary

  • Add null checks after getInterface() in 3 methods in variable-allocator.ts before passing result to getAllInterfaceFields()
  • Previously, if getInterface() returned null, the null was cast to InterfaceDeclaration and passed to getAllInterfaceFields(), causing a crash in the native compiler
  • Fixed methods: allocateFunctionInterfaceReturn, allocateMethodInterfaceReturn, allocateMapGetInterface
  • Now emits a clear compile-time error identifying the missing interface

Test plan

  • All 437 tests pass
  • Self-hosting verification passes (Stage 0 + Stage 1)

🤖 Generated with Claude Code

@cs01 cs01 merged commit 5689d83 into main Mar 9, 2026
12 checks passed
@cs01 cs01 deleted the fix/null-getInterface-checks branch March 12, 2026 05: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.

1 participant