aboutsummaryrefslogtreecommitdiff
path: root/AGENTS/SUBSYSTEMS/FUNCTIONS.md
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-30 14:33:33 +0000
committer_ov4 <ov4@ov4.org>2026-10-30 14:33:33 +0000
commit9b2d82dadbb465de71985a8db3aa8df454579b72 (patch)
tree686703c7f74565baad63f368b90124f8577c4616 /AGENTS/SUBSYSTEMS/FUNCTIONS.md
parent0cf54b4f77ccf8376341950b02ceb7c1d1268ed7 (diff)
docs(types): explain implicit constructors and raw text literalsHEADmain
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS/SUBSYSTEMS/FUNCTIONS.md')
-rw-r--r--AGENTS/SUBSYSTEMS/FUNCTIONS.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/AGENTS/SUBSYSTEMS/FUNCTIONS.md b/AGENTS/SUBSYSTEMS/FUNCTIONS.md
index 9555f1d..222d4da 100644
--- a/AGENTS/SUBSYSTEMS/FUNCTIONS.md
+++ b/AGENTS/SUBSYSTEMS/FUNCTIONS.md
@@ -27,7 +27,9 @@ internal __cps_main).
- `emitPrototype` records each function's pseudocode signature in a `FuncSig`
overload-set map (`FunctionGen::getOverloads`, filtered by unit visibility).
-- `resolveCall` selects exact static parameter types/ranks for OVERLOAD. When the call
+- `resolveCall` prefers exact static parameter types/ranks for OVERLOAD, then
+ marked constructor conversions for scalar BYVAL parameters. BYREF and arrays
+ remain exact; a single call never chains IMPLICIT constructors. When the call
site has an expected result type, the candidate must also return exactly that type;
a cast only prefers it. Without a context, return-only-distinct candidates use
the unique DEFAULT return, otherwise they are ambiguous. A single ordinary definition keeps implicit conversions.
@@ -57,7 +59,8 @@ internal __cps_main).
- PrototypeAST retains the operator token; FunctionGen validates operand count and
requires a record/class/enum operand.
-- Global signatures and left-class methods share exact-type selection, used by
+- Global signatures and left-class methods share exact-first selection with
+ marked BYVAL construction as fallback, used by
ValueTypeGen and ExpressionGen before builtin operations and filtered by an expected
result type where present. A strict context whose operands match but whose result does
not sets `WrongResult`. Missing candidates leave builtin rules intact; ties are