From 34012b361ae2800ce55e56ed3065f34e4deacf63 Mon Sep 17 00:00:00 2001
From: zy69guqi <richard.angersbach@fau.de>
Date: Wed, 12 Mar 2025 16:12:31 +0100
Subject: [PATCH] Fix typcheck

---
 src/pystencilssfg/composer/basic_composer.py | 2 +-
 src/pystencilssfg/generator.py               | 4 ++--
 src/pystencilssfg/ir/entities.py             | 3 +++
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/pystencilssfg/composer/basic_composer.py b/src/pystencilssfg/composer/basic_composer.py
index d598970..cdf425d 100644
--- a/src/pystencilssfg/composer/basic_composer.py
+++ b/src/pystencilssfg/composer/basic_composer.py
@@ -719,7 +719,7 @@ class SfgFunctionSequencer(SfgFunctionSequencerBase):
     def __call__(self, *args: SequencerArg) -> None:
         # check if header is in HYBRID mode for c_interfacing enabled
         if self._cursor.context.c_interfacing:
-            assert isinstance(self._cursor.context.header_file.file_type, SfgSourceFileType.HYBRID_HEADER)
+            assert self._cursor.context.header_file.file_type == SfgSourceFileType.HYBRID_HEADER
 
         """Populate the function body"""
         tree = make_sequence(*args)
diff --git a/src/pystencilssfg/generator.py b/src/pystencilssfg/generator.py
index 1eb30ce..b3916f4 100644
--- a/src/pystencilssfg/generator.py
+++ b/src/pystencilssfg/generator.py
@@ -177,8 +177,8 @@ class SourceFileGenerator:
             for inc in self._header_file.includes:
                 if inc.system_header and inc.__str__() in c_compatibility_headers:
                     c_header = inc.__str__().replace("<c", "<")
-                    self._header_file.hybrid_includes += HeaderFile(
-                        c_header, system_header=True)
+                    self._header_file.hybrid_includes += [HeaderFile(
+                        c_header, system_header=True)]
 
         if self._impl_file is not None:
             impl_includes = collect_includes(self._impl_file)
diff --git a/src/pystencilssfg/ir/entities.py b/src/pystencilssfg/ir/entities.py
index e20b2b7..41f5daa 100644
--- a/src/pystencilssfg/ir/entities.py
+++ b/src/pystencilssfg/ir/entities.py
@@ -383,6 +383,8 @@ class SfgMethod(SfgClassMember, CommonFunctionProperties):
         self._virtual = virtual
         self._override = override
 
+        externC = False
+
         parameters = self.collect_params(tree, required_params)
 
         CommonFunctionProperties.__init__(
@@ -391,6 +393,7 @@ class SfgMethod(SfgClassMember, CommonFunctionProperties):
             parameters,
             return_type,
             inline,
+            externC,
             constexpr,
             attributes,
         )
-- 
GitLab