test: cover empty compatibility method returns

This commit is contained in:
Hermes Agent
2026-09-18 15:24:45 +00:00
parent e17f450603
commit 19b624482f
6 changed files with 18 additions and 2 deletions
+2
View File
@@ -270,6 +270,8 @@ If a function or method declares `RETURNS TYPE` but uses `RETURN` without a valu
Function square needs a NUMBER value after RETURN. Add a NUMBER expression.
```
The same repair applies to compatibility methods written with `TAKES` / `LEARNED`, so older lessons also receive a method-specific hint instead of a generic type error.
If a function or method declares `RETURNS TYPE` but contains no `RETURN`, the checker points out the missing statement:
```text