Skip to content

fix: binary type checker works in native compiler, unskip 3 semantic tests#311

Merged
cs01 merged 1 commit intomainfrom
unskip-semantic-tests
Mar 13, 2026
Merged

fix: binary type checker works in native compiler, unskip 3 semantic tests#311
cs01 merged 1 commit intomainfrom
unskip-semantic-tests

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 13, 2026

Summary

  • Binary type checker now catches invalid operations ("hi" - 3, true + 8, [1,2,3] + "hello") in both JS and native compilers
  • Root cause: checker used ast.topLevelStatements which had wrong GEP indices in native compiler; switched to ast.topLevelItems
  • Used named AST types (VariableDeclaration, AssignmentStatement) instead of inline anonymous casts for correct field access
  • Fixed test annotations from @test-exit-code: 1 to @test-compile-error (these are compile-time errors, not runtime)
  • Unskipped 3 tests (20 remaining)

Test plan

  • All 607 tests pass
  • Stage 1 self-hosting passes
  • Native compiler correctly rejects "hi" - 3 and true + 8 with clear error messages

🤖 Generated with Claude Code

@cs01 cs01 merged commit 17b6bf3 into main Mar 13, 2026
12 checks passed
@cs01 cs01 deleted the unskip-semantic-tests branch March 19, 2026 05:23
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