typecheck: reject duplicate class fields

This commit is contained in:
Hermes Agent
2026-09-16 03:30:52 +00:00
parent edcfd697f6
commit eddb3ba067
7 changed files with 18 additions and 2 deletions
@@ -280,6 +280,7 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
"tests/typecheck_method_compat_unknown_field_bad.claro",
"tests/typecheck_method_unknown_field_typed_bad.claro",
"tests/typecheck_method_compat_unknown_field_typed_bad.claro",
"tests/typecheck_duplicate_field_bad.claro",
):
self.assertIn(f'"{fixture}"', source)
@@ -0,0 +1,7 @@
CLASS Player
HAS score NUMBER
HAS score TEXT
END
NEW Player player
SET player.score 10