typecheck: reject duplicate class fields
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user