Skip to content

Comments

Fix nullable iface field gep#53

Merged
cs01 merged 1 commit intomainfrom
fix-nullable-iface-field-gep
Feb 24, 2026
Merged

Fix nullable iface field gep#53
cs01 merged 1 commit intomainfrom
fix-nullable-iface-field-gep

Conversation

@cs01
Copy link
Owner

@cs01 cs01 commented Feb 24, 2026

Summary

  • Fix nullable interface field access (Foo | undefined) reading wrong field index — strip nullable suffixes before interface lookups and LLVM IR type names in storeInterfaceMetadata, loadFieldValue, and handleClassFieldChainedAccess

Test plan

  • All 358 tests pass (native compiler), all 225 pass (Node.js re-run)
  • Self-hosting verification passes (npm run verify:quick)
  • New test fixture tests/fixtures/interfaces/nullable-interface-field.ts exercises the bug scenario: class with Config | undefined field, accessing a non-first property (gamma at index 2)

@cs01 cs01 merged commit e85f31c into main Feb 24, 2026
12 checks passed
@cs01 cs01 deleted the fix-nullable-iface-field-gep branch February 24, 2026 00:40
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