Add errors for duplicate properties and blocks

This commit is contained in:
James Westman 2022-05-27 13:27:18 -05:00
parent f18c8b7a2d
commit 824476bda1
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
12 changed files with 122 additions and 0 deletions

View file

@ -112,6 +112,14 @@ class Property(AstNode):
)
@validate("name")
def unique_in_parent(self):
self.validate_unique_in_parent(
f"Duplicate property '{self.tokens['name']}'",
check=lambda child: child.tokens["name"] == self.tokens["name"]
)
@docs("name")
def property_docs(self):
if self.gir_property is not None: