test: cover numeric method return division

This commit is contained in:
Hermes Agent
2026-09-12 10:11:10 +00:00
parent 1fc8e72c1d
commit 689d2b2bcc
5 changed files with 27 additions and 2 deletions
+13
View File
@@ -85,6 +85,19 @@ END
This valid division case is included in the focused typecheck validation matrix beside the diagnostic for using a TEXT operand in division.
The same protection applies to object methods. A checked NUMBER parameter can be divided by a number and returned as NUMBER:
```claro
CLASS Player
TEACH total amount RETURNS NUMBER
CHECK TYPE amount IS NUMBER
RETURN amount / 2
END
END
```
This valid method-division case is included in the focused typecheck validation matrix beside the method diagnostic for using a TEXT operand in division.
Return declarations accept the same case-insensitive keyword style as the rest of Claro. For example, `returns NUMBER` still enables return checking:
```claro