test: cover modern YESNO method field assignment

This commit is contained in:
Hermes Agent
2026-09-15 00:08:03 +00:00
parent 43d596d85b
commit 9677ed81ba
5 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ The diagnostic is:
Object Player has no field level. Check the field name or add HAS level NUMBER to the class.
```
This narrow check covers direct method assignments with a known expression in both modern `TEACH ... END` and compatibility `TEACH ... TAKES ... LEARNED` methods. The focused validation matrix also keeps a correct compatibility NUMBER assignment such as `SET score amount + 1` covered, alongside the existing TEXT and YESNO compatibility examples. Broader local-variable and control-flow analysis remains future work.
This narrow check covers direct method assignments with a known expression in both modern `TEACH ... END` and compatibility `TEACH ... TAKES ... LEARNED` methods. The focused validation matrix keeps matching positive NUMBER, TEXT, and YESNO assignments in both syntax generations, including `SET ready value` followed by `DO player.toggle YES`. Broader local-variable and control-flow analysis remains future work.
## Complete conditional returns