mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
adw-breakpoint: Fix bug when setting template prop
When a breakpoint setter's target object was the template, the compiler failed with an assertion error. Fixed by allowing TemplateType objects there. The assertion is still needed to make the type checker happy.
This commit is contained in:
parent
adc2be1454
commit
b33cc7ccd7
1 changed files with 3 additions and 1 deletions
|
@ -98,7 +98,9 @@ class AdwBreakpointSetter(AstNode):
|
||||||
and not isinstance(self.gir_class, ExternType)
|
and not isinstance(self.gir_class, ExternType)
|
||||||
and self.property_name is not None
|
and self.property_name is not None
|
||||||
):
|
):
|
||||||
assert isinstance(self.gir_class, gir.Class)
|
assert isinstance(self.gir_class, gir.Class) or isinstance(
|
||||||
|
self.gir_class, gir.TemplateType
|
||||||
|
)
|
||||||
return self.gir_class.properties.get(self.property_name)
|
return self.gir_class.properties.get(self.property_name)
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue