gir: Fix assignable_to for interface implementations

Part of #29
This commit is contained in:
James Westman 2022-01-11 22:32:06 -06:00
parent 0e3280fcc5
commit 85150d397b
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
6 changed files with 22 additions and 4 deletions

View file

@ -257,9 +257,11 @@ class Class(GirNode, GirType):
return True
elif self.parent and self.parent.assignable_to(other):
return True
elif other in self.implements:
return True
else:
for iface in self.implements:
if self.get_containing(Namespace).lookup_type(iface).assignable_to(other):
return True
return False