Skip to content

error on getter/setter methods in class declarations#77

Merged
cs01 merged 1 commit intomainfrom
worktree-no-getters-setters
Mar 2, 2026
Merged

error on getter/setter methods in class declarations#77
cs01 merged 1 commit intomainfrom
worktree-no-getters-setters

Conversation

@cs01
Copy link
Owner

@cs01 cs01 commented Mar 2, 2026

Summary

Error on getter/setter methods in class declarations. ChadScript doesn't support property accessors—users must use regular public methods instead.

Changes

  • Parser (TS): Detect getter/setter declarations and emit compile error with file:line:column location
  • Parser (Native): Same detection in native parser with error reporting
  • Compiler lib: Set current file path before parsing so error messages have correct file context
  • Test: Add fixture expecting compile error on get value()

@cs01 cs01 merged commit fce63a2 into main Mar 2, 2026
12 checks passed
@cs01 cs01 deleted the worktree-no-getters-setters branch March 2, 2026 17:12
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