Skip to content

fix: use SetNode type for Set<string> allocation, fixing native compiler codegen bug#222

Merged
cs01 merged 1 commit intomainfrom
fix/stringset-has-native
Mar 11, 2026
Merged

fix: use SetNode type for Set<string> allocation, fixing native compiler codegen bug#222
cs01 merged 1 commit intomainfrom
fix/stringset-has-native

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 11, 2026

Summary

  • Fix native compiler generating numeric Set codegen for Set<string> variables
  • Root cause: inline type assertion as { valueType?: string } on SetNode reads field at wrong struct index — native compiler accesses index 0 instead of index 2 for valueType
  • Fix: replace with proper as SetNode from ast/types.ts (already imported)
  • Un-skip the set-string-operations test — now tests add, has, delete, and size for Set<string>

Test plan

  • set-string-operations.ts passes with both JS and native compiler
  • verify:quick passes including self-hosting Stage 1

@cs01 cs01 merged commit 0836e71 into main Mar 11, 2026
12 checks passed
@cs01 cs01 deleted the fix/stringset-has-native 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