Skip to content

fix: use getAllInterfaceFields for function interface parameter metadata#122

Merged
cs01 merged 1 commit intomainfrom
fix/funcgen-getAllInterfaceFields
Mar 8, 2026
Merged

fix: use getAllInterfaceFields for function interface parameter metadata#122
cs01 merged 1 commit intomainfrom
fix/funcgen-getAllInterfaceFields

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 8, 2026

Summary

  • FunctionGenerator built ObjectMetadata for interface-typed function parameters using iface.fields directly — only own fields, missing inherited ones from extends
  • Added getAllInterfaceFields(iface: InterfaceDeclaration): InterfaceField[] to FunctionGeneratorContext interface (already implemented by LLVMGenerator.getAllInterfaceFields)
  • Changed inline anonymous type cast to InterfaceDeclaration and call ctx.getAllInterfaceFields(iface) for the field list
  • Added test fixture interfaces/interface-extends-param.ts verifying inherited field access inside functions

Test plan

  • All 430 unit tests pass (includes new interface-extends-param test)
  • Full 3-stage self-hosting passes

🤖 Generated with Claude Code

@cs01 cs01 merged commit 7a590fe into main Mar 8, 2026
12 checks passed
@cs01 cs01 deleted the fix/funcgen-getAllInterfaceFields 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