diff --git a/cmd/genbindings/transformblocklist.go b/cmd/genbindings/transformblocklist.go index eb14acd5..7d9294a3 100644 --- a/cmd/genbindings/transformblocklist.go +++ b/cmd/genbindings/transformblocklist.go @@ -27,6 +27,12 @@ func astTransformBlocklist(parsed *CppParsedHeader) { continue } + // If this class is abstract, but we return !AllowVirtualForClass, then + // delete its constructors + if c.Abstract && !AllowVirtualForClass(c.ClassName) { + c.Ctors = nil + } + // Keep parsed.Classes[j] = c j++