From 24eed1048e10b6daef4166c5b9e109d669eb3a6c Mon Sep 17 00:00:00 2001 From: James Westman Date: Fri, 26 Jul 2024 21:38:17 -0500 Subject: [PATCH] gir: Fix assignable_to for template types If we don't know the template's parent type, we should be able to assign it to an extern type, since we don't know anything about that either. --- blueprintcompiler/gir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprintcompiler/gir.py b/blueprintcompiler/gir.py index 029fe58..459086e 100644 --- a/blueprintcompiler/gir.py +++ b/blueprintcompiler/gir.py @@ -721,7 +721,7 @@ class TemplateType(GirType): # we don't know the template type's interfaces, assume yes return True elif self.parent is None or isinstance(self.parent, ExternType): - return isinstance(other, Class) + return isinstance(other, Class) or isinstance(other, ExternType) else: return self.parent.assignable_to(other)