More errors for duplicates

This commit is contained in:
James Westman 2023-05-17 10:25:25 -05:00
parent 2ca71de061
commit 6ac798ea6f
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
13 changed files with 105 additions and 9 deletions

View file

@ -47,6 +47,12 @@ class Widget(AstNode):
f"Cannot assign {object.gir_class.full_name} to {type.full_name}"
)
@validate("name")
def unique_in_parent(self):
self.validate_unique_in_parent(
f"Object '{self.name}' is listed twice", lambda x: x.name == self.name
)
class ExtSizeGroupWidgets(AstNode):
grammar = [