typecheck: preserve lowercase return declarations

This commit is contained in:
Hermes Agent
2026-09-10 14:56:37 +00:00
parent 561c272e81
commit 1e4f15b486
7 changed files with 24 additions and 4 deletions
+10
View File
@@ -58,6 +58,16 @@ This is accepted with `Type check OK`. More complex nested container operations
## Complete conditional returns
Return declarations accept the same case-insensitive keyword style as the rest of Claro. For example, `returns NUMBER` still enables return checking:
```claro
TEACH square amount returns NUMBER
RETURN "oops"
END
```
This reports a normal return mismatch naming `NUMBER` and `TEXT`; capitalization style does not disable the safety check.
When a function declares a return type, `claro typecheck` accepts nested conditionals when every branch returns a value of that type:
```claro