Skip to content

Misc fixes#85

Closed
cs01 wants to merge 5 commits intomainfrom
misc-fixes
Closed

Misc fixes#85
cs01 wants to merge 5 commits intomainfrom
misc-fixes

Conversation

@cs01
Copy link
Owner

@cs01 cs01 commented Mar 4, 2026

misc-fixes

Summary

Miscellaneous compiler improvements: fix FunctionNode field ordering for native compiler stability, add type alias global variable support, simplify union-type-checker, and sync c.json() type signature.

Changes

  • Fix typeParameters field order in FunctionNode — Moved typeParameters to the end of the interface and all creation sites (parser-ts, parser-native). Required for native compiler struct layout correctness: fields after any undefined-valued boolean can shift GEP indices.

  • Type alias global variable support — Global const/let declarations typed with a type alias (e.g. const config: Config) now resolve the alias to its LLVM type instead of falling through to expression-based detection.

  • Sync c.json() type signaturelib/router.ts already accepted any since Router and JSON auto-serialization fixes #82, but chadscript.d.ts still declared json(data: string). Updated to json(data: any).

  • Simplify union-type-checker — Converted from class to standalone functions. No behavioral change.

Testing

All existing tests pass.

@cs01 cs01 closed this Mar 4, 2026
@cs01 cs01 deleted the misc-fixes branch March 4, 2026 07:32
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