mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
validation: Disallow instantiating abstract classes
This commit is contained in:
parent
f78478bea1
commit
99e428d93c
17 changed files with 35 additions and 13 deletions
|
@ -236,6 +236,10 @@ class Class(GirNode, GirType):
|
|||
self.own_properties = {child["name"]: Property(self, child) for child in xml.get_elements("property")}
|
||||
self.own_signals = {child["name"]: Signal(self, child) for child in xml.get_elements("glib:signal")}
|
||||
|
||||
@property
|
||||
def abstract(self):
|
||||
return self.xml["abstract"] == "1"
|
||||
|
||||
@property
|
||||
def signature(self):
|
||||
result = f"class {self.container.name}.{self.name}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue