     let cGIRType = GIRType(name: ctype, ctype: ctype)
 //    let ctypeRef = TypeReference.pointer(to: cGIRType)
     let parentType = e.parentType
-    let hasParent = parentType != nil
+    let hasParent = parentType != nil || !parent.isEmpty
     let scode = signalNameCode(indentation: indentation)
     let ncode = signalNameCode(indentation: indentation, prefixes: ("notify", "notify::"))
     let ccode = convenienceConstructorCode(typeRef, indentation: indentation, override: "override ", hasParent: hasParent)(e)

            }.map { $0.protocolName.withNormalisedPrefix }
            let p = recordProtocolCode(r, parent: parents.joined(separator: ", "), ptr: ptrName)
            let s = recordStructCode(r, ptr: ptrName)
            let c = recordClassCode(r, parent: cl?.parent ?? "", ptr: ptrName)
            let e = recordProtocolExtensionCode(funcs, r, ptr: ptrName)
            let code = p + s + c + e
            return code

        release = "// no reference counting for \(ctype.swift), cannot unref"
        releasePtr = ptr
    }
    let parentName = hasParent ? parentType!.name.withNormalisedPrefix.swift : ""
    let p = parent.isEmpty ? (hasParent ? "\(parentName), " : "") : "\(parent), "
    let documentation = commentCode(e)
    let subTypeAliases = e.records.map { subTypeAlias(e, $0) }.joined()
