Skip to content

fix: use correct llvm types for super() constructor args#229

Merged
cs01 merged 1 commit intomainfrom
fix/super-numeric-param
Mar 11, 2026
Merged

fix: use correct llvm types for super() constructor args#229
cs01 merged 1 commit intomainfrom
fix/super-numeric-param

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 11, 2026

Summary

  • super() calls previously hardcoded all arguments as i8*, causing compile failures when parent constructors take numeric parameters
  • now looks up parent constructor's paramTypes and uses mapParamTypeToLLVM for correct types
  • adds ensureDouble coercion for numeric args passed to super()

Test plan

  • new test fixture: classes/class-super-numeric.ts — Vehicle(string, number) + Car extends Vehicle
  • verify:quick passes (tests + stage 1 self-hosting)

🤖 Generated with Claude Code

@cs01 cs01 merged commit c40e8ae into main Mar 11, 2026
12 checks passed
@cs01 cs01 deleted the fix/super-numeric-param 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