aboutsummaryrefslogtreecommitdiff
path: root/tests/iii/operator-global-errors
diff options
context:
space:
mode:
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