mirror of
https://github.com/mappu/miqt.git
synced 2025-01-20 21:50:38 +00:00
genbindings: expand virtual overrides to cover indirect base classes
This commit is contained in:
parent
883ba8c131
commit
8705ac0b5c
@ -449,10 +449,11 @@ func (c *CppClass) VirtualMethods() []CppMethod {
|
||||
retNames[m.CppCallTarget()] = struct{}{}
|
||||
}
|
||||
|
||||
// Only allow virtual overrides for direct inherits, not all inherits -
|
||||
// Go will automatically allow virtual overrides for the base type because
|
||||
// the parent struct is nested
|
||||
for _, cinfo := range c.DirectInheritClassInfo() {
|
||||
// the parent struct is nested, but the resulting functions will not work
|
||||
// because the C ABI dynamic_cast<> will fail for the base type.
|
||||
// Scan all inherited classes
|
||||
for _, cinfo := range c.AllInheritsClassInfo() {
|
||||
|
||||
// If a base class is permanently unprojectable, the child classes
|
||||
// should be too
|
||||
|
Loading…
x
Reference in New Issue
Block a user