test: cover typed method return expressions

This commit is contained in:
Hermes Agent
2026-09-09 05:50:44 +00:00
parent 57246c7a47
commit 465f3f4d26
8 changed files with 24 additions and 4 deletions
+1 -1
View File
@@ -325,7 +325,7 @@ Returning text from this method produces a learner-facing diagnostic that names
Type mismatch for return from Player.score: expected NUMBER, but this value looks like TEXT.
```
This is a focused check for simple return expressions. When a parameter has a `CHECK TYPE` declaration, that known type also informs arithmetic return expressions, so `RETURN amount + 1` is checked against the declared return type. Branch-sensitive return analysis and richer method signatures remain planned.
This is a focused check for simple return expressions. When a parameter has a `CHECK TYPE` declaration, that known type also informs arithmetic return expressions in functions and methods, so `RETURN amount + 1` is checked against the declared return type. The focused validation matrix covers both method success and mismatch fixtures. Branch-sensitive return analysis and richer method signatures remain planned.
## Object method parameter checks