From 05cdcb6a1cc3d4de3a0b3d12d4babcd6438b4754 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 13 Oct 2026 13:45:03 +0000 Subject: Add record-derived classes with explicit field visibility Co-Authored-By: Claude Fable 5.1 --- AGENTS/PITFALLS.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'AGENTS/PITFALLS.md') diff --git a/AGENTS/PITFALLS.md b/AGENTS/PITFALLS.md index ea6a4d7..b70718c 100644 --- a/AGENTS/PITFALLS.md +++ b/AGENTS/PITFALLS.md @@ -71,11 +71,19 @@ test programs. followed by `.` is swallowed into a REAL literal, so `1.foo` mislexes (only already-invalid programs can hit it). +- **CLASS subset (§10).** `CLASS`/`ENDCLASS`/`PUBLIC`/`PRIVATE` are reserved. + CLASS is a top-level record-derived value type with mandatory per-field access + keywords (no DECLARE). Unlike the guide's default-public rule, omitting access + is an error. TYPE fields cannot specify access and remain public. Private fields + cannot be accessed externally; whole-value initialization/copying is allowed. + CLASS inherits record limitations, including no array fields or empty bodies. + ## Not implemented (9618 features) CASE OF, CONSTANT, SET types (`SET`/`DEFINE` are reserved with dedicated errors), random files (OPENFILE...FOR RANDOM/SEEK/GETRECORD/PUTRECORD — TYPE is done, so these are unblocked now; the RANDOM keyword is reserved and gives a dedicated parse error), DATE, INPUT into array elements, string escape sequences, -array-typed record fields, whole-array RETURN. No tests and no CI exist; verify +array-typed record fields, whole-array RETURN, class methods/constructors/destructors, +NEW and class inheritance. No compiler tests or CI exist; verify changes by compiling sample programs end-to-end (command sequence in `ARCH.md`). -- cgit v1.3.1-4-g156e