test: cover valid object-field subtraction

This commit is contained in:
Hermes Agent
2026-09-08 00:58:01 +00:00
parent 142d1e846e
commit 7ecaf3fc94
7 changed files with 25 additions and 3 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ Ready now:
Still needed:
- Keep the focused typecheck validator's fixture list complete as new positive and negative examples are added.
- The expression checker now carries a known TEXT operand through all arithmetic operators so object-field diagnostics do not hide subtraction, multiplication, or division mistakes; focused numeric-division and numeric-multiplication positives plus text-operand subtraction, multiplication, and division negatives protect this behavior. Subtraction, multiplication, and division name the text operand and explain that the operator needs NUMBER values.
- The expression checker now carries a known TEXT operand through all arithmetic operators so object-field diagnostics do not hide subtraction, multiplication, or division mistakes; focused numeric-subtraction, numeric-division, and numeric-multiplication positives plus text-operand subtraction, multiplication, and division negatives protect this behavior. Subtraction, multiplication, and division name the text operand and explain that the operator needs NUMBER values.
- richer typed function signatures and return values
- type checking through branches and loops
- richer object field type checking beyond simple direct assignments
+1 -1
View File
@@ -36,7 +36,7 @@ See `CURRENT_STATUS.md` for the detailed feature matrix.
3b. Keep package security validation in Forgejo/Gitea CI so unsafe names, exact manifest-version/name/version/checksum mismatches, missing manifests, duplicate project manifest versions and packages, duplicate lock packages, duplicate package manifest names, versions, and checksums, and lockfile errors remain release blockers.
4. Add small examples for each foundation feature before adding bigger syntax. The object-field foundation now includes positive and negative validation for field expressions such as `SET player.score player.name`, `SET player.score player.score + 1`, `SET player.name player.score + 1`, explicitly typed field assignments, simple and chained aliases such as `SET alias player`, `SET backup alias`, followed by `SET backup.score ...` or `CHECK TYPE backup.score IS ...`, chained aliases in object-method calls through both modern `DO` and compatibility `CALL ... WITH` forms (including a dedicated positive modern `DO` fixture), and arithmetic/text expression mismatches; typed containers also accept a map with nested type metadata when it is added to a `LIST OF MAP`; broader alias/control-flow checking remains planned.
5. Keep the focused typecheck validator complete: every `typecheck_*.claro` fixture, including positive fixtures, must be exercised by release validation.
6. Continue narrowing expression diagnostics: known TEXT operands now remain visible through non-concatenation arithmetic, with focused numeric-division and numeric-multiplication positives plus text-operand subtraction, multiplication, and division coverage. Subtraction, multiplication, and division give operator-specific guidance naming the text operand.
6. Continue narrowing expression diagnostics: known TEXT operands now remain visible through non-concatenation arithmetic, with focused numeric-subtraction, numeric-division, and numeric-multiplication positives plus text-operand subtraction, multiplication, and division coverage. Subtraction, multiplication, and division give operator-specific guidance naming the text operand.
## Complete-platform milestones