Skip to content

[type-system] add explicit type dispatch to getFieldLlvmType and methodReturnTypeToLlvm#751

Merged
cs01 merged 2 commits intomainfrom
refactor/silent-default-calls-member
Apr 27, 2026
Merged

[type-system] add explicit type dispatch to getFieldLlvmType and methodReturnTypeToLlvm#751
cs01 merged 2 commits intomainfrom
refactor/silent-default-calls-member

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Apr 26, 2026

Before

getFieldLlvmType in calls.ts and methodReturnTypeToLlvm in class.ts had silent return "i8*" fallbacks that would mask unrecognized types instead of failing loud.

After

Both functions now have explicit type dispatch for known categories (primitives, LLVM types, inline objects, function types, class/interface names) before any fallback. methodReturnTypeToLlvm throws on truly unrecognized types. getFieldLlvmType preserves LLVM type passthroughs before the final catch-all.

Description

Part of #710 (eliminate silent-default dispatch). Third PR in series after #749 (fieldTypeToLlvmPrimitive dedup) and #750 (fieldTypeToLlvm dedup + fail-loud). Behavioral equivalence maintained — no test changes needed, all 880 tests pass.

Next Steps

Continue through remaining silent-default sites identified in #710.

@cs01 cs01 merged commit 0b36ef4 into main Apr 27, 2026
9 checks passed
@cs01 cs01 deleted the refactor/silent-default-calls-member branch April 27, 2026 20:49
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