diff options
Diffstat (limited to 'tests/iii/operator-global-errors/program.cps')
| -rw-r--r-- | tests/iii/operator-global-errors/program.cps | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/iii/operator-global-errors/program.cps b/tests/iii/operator-global-errors/program.cps new file mode 100644 index 0000000..23bfae1 --- /dev/null +++ b/tests/iii/operator-global-errors/program.cps @@ -0,0 +1,22 @@ +TYPE Box +DECLARE Value : INTEGER +ENDTYPE +OVERLOAD FUNCTION OPERATOR+(a : Box, b : REAL) RETURNS INTEGER +RETURN 1 +ENDFUNCTION +OVERLOAD FUNCTION OPERATOR<(a : Box, b : Box) RETURNS STRING +RETURN "text" +ENDFUNCTION +DECLARE a : Box +DECLARE flag : BOOLEAN +flag <- a < a +OUTPUT a + 1 +OVERLOAD FUNCTION OPERATOR&(a : INTEGER, b : STRING) RETURNS STRING +RETURN b +ENDFUNCTION +OVERLOAD FUNCTION OPERATOR*(a : Box) RETURNS INTEGER +RETURN 1 +ENDFUNCTION +OVERLOAD FUNCTION OPERATOR+(a : Box, b : REAL) RETURNS REAL +RETURN 2.0 +ENDFUNCTION |
