test: cover lowercase compatibility method returns

This commit is contained in:
Hermes Agent
2026-09-10 23:12:18 +00:00
parent 04a6476960
commit e28388407d
7 changed files with 32 additions and 3 deletions
+9
View File
@@ -84,6 +84,15 @@ END
Type mismatch for return from Player.score: expected NUMBER, but this value looks like TEXT.
```
A correct compatibility call also remains valid when the declaration uses lowercase `returns`:
```claro
NEW Player player
CALL player.score WITH 4
```
This success path is included in the focused typecheck validation matrix.
When a function declares a return type, `claro typecheck` accepts nested conditionals when every branch returns a value of that type:
```claro