Fix template types

This commit is contained in:
James Westman 2023-03-28 10:41:42 -05:00
parent 64879491a1
commit 88f5b4f1c7
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
14 changed files with 120 additions and 21 deletions

View file

@ -20,7 +20,7 @@
import typing as T
from .common import *
from ..gir import Class, Interface
from ..gir import Class, ExternType, Interface
class TypeName(AstNode):
@ -70,7 +70,7 @@ class TypeName(AstNode):
self.tokens["class_name"], self.tokens["namespace"]
)
return gir.UncheckedType(self.tokens["class_name"])
return gir.ExternType(self.tokens["class_name"])
@property
def glib_type_name(self) -> str:
@ -95,7 +95,7 @@ class ClassName(TypeName):
def gir_class_exists(self):
if (
self.gir_type is not None
and not isinstance(self.gir_type, UncheckedType)
and not isinstance(self.gir_type, ExternType)
and not isinstance(self.gir_type, Class)
):
if isinstance(self.gir_type, Interface):