I have the following child class set up in my Python code:
class NodeRewriter(SyntaxRewriter[SyntaxNode]):
def visit(self, node: SyntaxNode):
print(node)
Here are the relevant objects:
RuntimeWarning: class "slang::SyntaxRewriter<slang::SyntaxNode>" has no virtual destructor
class NodeRewriter(SyntaxRewriter[SyntaxNode]):
>>> print(SyntaxRewriter)
<cppyy.Template 'slang::SyntaxRewriter' object at 0x7fb76c0c15b0>
>>> print(SyntaxNode)
<class cppyy.gbl.slang.SyntaxNode at 0x55e4302f07c0>
>>> print(SyntaxRewriter[SyntaxNode])
<class cppyy.gbl.slang.SyntaxRewriter<slang::SyntaxNode> at 0x55e4308df4b0>
>>>
All I am doing is creating the class, I haven't created any objects from it yet. I get the warning when I import the file containing the class and the rest of the cppyy code.
Do I need to add a __destruct__()
method myself? It seems the warning is not referring to my child class but to the template instantiation it inherits from.