     /// Designated initialiser for a GIR type
     /// - Parameters:
     ///   - name: The name of the type
-    ///   - swiftName: The name of the type in Swift (or `nil` if same as `name`)
-    ///   - typeName: The name of the underlying type (or `nil` if same as `ctype`)
+    ///   - swiftName: The name of the type in Swift (empty or `nil` if same as `name`)
+    ///   - typeName: The name of the underlying type (empty or `nil` if same as `ctype`)
     ///   - ctype: The name of the type in C
     ///   - superType: The parent or alias type (or `nil` if fundamental)
     ///   - isAlias: An indicator whether the type is an alias of its supertype that does not need casting

    public func hash(into hasher: inout Hasher) {
        hasher.combine(name)
        hasher.combine(swiftName)
        hasher.combine(ctype)
        hasher.combine(parent)
        hasher.combine(isAlias)
    }
}

    public init(name: String, swiftName: String? = nil, typeName: String? = nil, ctype: String, superType: TypeReference? = nil, isAlias: Bool = false, conversions: [GIRType : [TypeConversion]] = [:]) {
        precondition(isAlias == false || superType != nil)
        self.name = name
        self.swiftName = swiftName.map { $0.isEmpty ? name : $0 } ?? name
        self.typeName = typeName.map { $0.isEmpty ? ctype : $0 } ?? ctype
        self.ctype = ctype
        self.parent = superType
        self.isAlias = isAlias
