aboutsummaryrefslogtreecommitdiff
path: root/tests/iii/operator-global-errors
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-20 13:07:03 +0000
committer_ov4 <ov4@ov4.org>2026-10-20 13:07:03 +0000
commitc682f983b0dce3acba76d1f08719a26b9c52c5ec (patch)
tree88b1e2f236bb496fe0966f7daec5879add27b747 /tests/iii/operator-global-errors
parent8f532e4ad72e82acc9135ffd24ecd923bc6d23ee (diff)
test(strings): align error cases with the standard library
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/iii/operator-global-errors')
-rw-r--r--tests/iii/operator-global-errors/notes.md2
-rw-r--r--tests/iii/operator-global-errors/program.cps2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/iii/operator-global-errors/notes.md b/tests/iii/operator-global-errors/notes.md
index 24bb113..ef5c9c2 100644
--- a/tests/iii/operator-global-errors/notes.md
+++ b/tests/iii/operator-global-errors/notes.md
@@ -1,3 +1,3 @@
# operator-global-errors
-Reject a STRING comparison result assigned to BOOLEAN, implicit INTEGER-to-REAL overload matching, builtin-only overloads, wrong arity and return-type-only duplicates.
+Reject a STRING comparison result assigned to BOOLEAN, implicit INTEGER-to-REAL overload matching, operator overloads with only INTEGER operands, wrong arity and return-type-only duplicates. STRING is a class and can participate in operator overloads, so the invalid declaration uses INTEGER for both operands.
diff --git a/tests/iii/operator-global-errors/program.cps b/tests/iii/operator-global-errors/program.cps
index 23bfae1..b9d007a 100644
--- a/tests/iii/operator-global-errors/program.cps
+++ b/tests/iii/operator-global-errors/program.cps
@@ -11,7 +11,7 @@ DECLARE a : Box
DECLARE flag : BOOLEAN
flag <- a < a
OUTPUT a + 1
-OVERLOAD FUNCTION OPERATOR&(a : INTEGER, b : STRING) RETURNS STRING
+OVERLOAD FUNCTION OPERATOR&(a : INTEGER, b : INTEGER) RETURNS INTEGER
RETURN b
ENDFUNCTION
OVERLOAD FUNCTION OPERATOR*(a : Box) RETURNS INTEGER