Skip to content

fix: replace 16 stack traces with compile errors for property/variable access failures#188

Merged
cs01 merged 2 commits intomainfrom
throw-to-emiterror-3
Mar 10, 2026
Merged

fix: replace 16 stack traces with compile errors for property/variable access failures#188
cs01 merged 2 commits intomainfrom
throw-to-emiterror-3

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 10, 2026

Summary

  • When users access a non-existent property on an object, class, or interface, they now get a clear compile error with file/line info instead of an ugly Node.js stack trace
  • Same improvement for index access errors (wrong key type, unsupported assignment targets) and unary operator errors (increment/decrement on undeclared variables)
  • 16 throw new Error calls converted to emitError() across 4 files: member.ts, index.ts, struct-access.ts, unary.ts

Test plan

  • npm run verify:quick passes (tests + Stage 1 self-hosting)

🤖 Generated with Claude Code

@cs01 cs01 merged commit c38b126 into main Mar 10, 2026
12 checks passed
@cs01 cs01 deleted the throw-to-emiterror-3 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