aboutsummaryrefslogtreecommitdiff
path: root/AGENTS/PITFALLS.md
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-20 01:29:11 +0000
committer_ov4 <ov4@ov4.org>2026-10-20 01:29:11 +0000
commit81e18a089ccc5ef4869d6b5a53f49e4696d33dd7 (patch)
tree1eef2688db191cc59ca8de2d612fd7e8619157a7 /AGENTS/PITFALLS.md
parent7a090c08a7406c3bd364ee78e0f8a581c29e58a6 (diff)
docs(agents): align dispatch and object lifetime guidance with code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS/PITFALLS.md')
-rw-r--r--AGENTS/PITFALLS.md12
1 files changed, 8 insertions, 4 deletions
diff --git a/AGENTS/PITFALLS.md b/AGENTS/PITFALLS.md
index 4c72a4f..178e173 100644
--- a/AGENTS/PITFALLS.md
+++ b/AGENTS/PITFALLS.md
@@ -93,14 +93,17 @@ test programs.
inputs. MAIN and builtins cannot be overloaded. NEW supports overloads; DECLARE,
fields and arrays needing default construction require a matching no-argument NEW.
Private access is checked after selection, never used to select a public fallback.
-- **OPERATOR extension.** Requires OVERLOAD FUNCTION, with supported unary/binary
+- **OPERATOR extension.** Unary/binary operators require OVERLOAD FUNCTION, with supported
arity and at least one record/class/enum operand. Pointer aliases alone do not
qualify. Exact matching considers visible globals and left-class members
together; ties are errors, including private/public ties. Comparison and logic
result types are declared, not assumed BOOLEAN; implicit STRING to BOOLEAN is
rejected. CASE comparisons must return BOOLEAN. AND/OR overloads evaluate both
- operands. Temporary member receivers have function-scoped cleanup, not C++
- full-expression lifetimes. Explicit calls use OPERATOR+(a,b) or a.OPERATOR+(b).
+ operands. Temporary member receivers are destroyed at statement end, including
+ exception exits; ordinary DECLARE objects remain function-scoped. Explicit calls
+ use OPERATOR+(a,b) or a.OPERATOR+(b). Assignment uses member-only
+ OVERLOAD PROCEDURE OPERATOR<- with one explicit parameter; it is selected before
+ fallback same-class copying. Keyword NEW retains its allocation/rebinding path.
- **CLASS subset (ยง10).** `CLASS`/`ENDCLASS`/`PUBLIC`/`PRIVATE` are reserved.
CLASS is a top-level record-derived value type with optional per-member access
keywords (no DECLARE). Omitting access defaults to public, per the guide.
@@ -144,7 +147,8 @@ test programs.
Native binaries must link the C++ runtime with LLVM 23's `clang++`
(`clang++-23` on Debian/Ubuntu).
Unwinding does not free heap strings/arrays or close files. Embedded ORC
- execution with LLVM 23 is verified on Linux, Windows and macOS.
+ execution with LLVM 23 is exercised by nightly CI on Linux, Windows and macOS;
+ check the native job results when changing platform-specific code.
- **C type extensions.** C_STRING is a raw char pointer, not a STRING: explicitly
cast to STRING for printing or builtins. C aliases share canonical CIdentity;