Commit 9cbf4819 authored by gsamain's avatar gsamain

Issue error when trying to declare a cppclass in a c-only compilation target

parent a5dd0809
...@@ -1465,6 +1465,8 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode): ...@@ -1465,6 +1465,8 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode):
decorators = None decorators = None
def declare(self, env): def declare(self, env):
if not env.is_cpp():
error(self.pos, "Could not use cppclass in a c-only environment !")
if self.templates is None: if self.templates is None:
template_types = None template_types = None
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment