typecheck: validate aliased object fields

This commit is contained in:
Hermes Agent
2026-09-06 05:53:57 +00:00
parent cb061886e3
commit 6198b75f66
8 changed files with 51 additions and 3 deletions
+4
View File
@@ -134,6 +134,9 @@ EXPECTED = {
"tests/typecheck_object_field_unknown_object_bad.claro": [
"tests/typecheck_object_field_unknown_object_bad.claro:5: Object player is not known yet. Create it with NEW ClassName player before setting player.score.",
],
"tests/typecheck_object_field_alias_bad.claro": [
"tests/typecheck_object_field_alias_bad.claro:7: Type mismatch for field alias.score: expected NUMBER, but this value looks like TEXT.",
],
}
EXPECTED_OK = [
@@ -149,6 +152,7 @@ EXPECTED_OK = [
"tests/typecheck_object_field_check_type_number_good.claro",
"tests/typecheck_object_field_check_type_text_good.claro",
"tests/typecheck_object_field_check_type_text_yesno_good.claro",
"tests/typecheck_object_field_alias_good.claro",
"tests/typecheck_nested_container_good.claro",
"tests/37_object_field_types.claro",
]