While implementing GSVG, I had to add DomDocumentType
to a DomDocument
, so your renderer will recognize it is a SVG document, so I use following:
class GomNode : DomNode
class GomDocumentType : GomNode, DomNode
Note GomNode
is implementing DomNode
, so yo don’t need to add that interface in its derived classes GomDocumentType
.
Hours after a set of debugs, I found you should don’t do that, because it produce a infinite cycle, leading to a crash.
So, your GomDocumentType
should be:
class GomDocumentType : GomNode
Now GomDocumentType
is a DomNode
too.
This sounds like a bug in Vala.
At the end, it is. Unlike C/GObject, Vala rise errors on unimplemented methods or interfaces declared as prerequisites. This is a programming error and the compiler could help, by detecting if the classes, the new class derives from, have implemented an interface to rise an error.
I’ve filed a bug report at: https://bugzilla.gnome.org/show_bug.cgi?id=789443