 
     /// All fundamental types prior to GIR parsing
     static var fundamentalTypes: Set<GIRType> = {
-        return numericTypes ∪ boolType ∪ voidType ∪ stringType ∪ aliases
+        return numericTypes ∪ boolType ∪ voidType ∪ stringType ∪ errorTypes ∪ aliases
     }()
 
     /// All numeric conversions

        self.init(aliasOf: TypeReference(type: aliasOf), name: name, swiftName: swiftName, ctype: ctype)
    }

    /// Return the cast to convert the given expression to the target type
    /// - Parameters:
    ///   - expression: The expression to cast
    ///   - target: The target type to cast to
    /// - Returns: The cast expression string, or `nil` if there is no way to cast to `target`
    @inlinable
    public func cast(expression: String, to target: GIRType) -> String? {
        guard let conversion = conversions[target] else { return nil }
        return conversion.castToTarget(from: expression)
    }

    /// Return the cast to convert the given expression to the target type
    /// - Parameters:
    ///   - expression: The expression to cast
    ///   - source: The source type to cast from
    /// - Returns: The cast expression string, or `nil` if there is no way to cast from `source`
    @inlinable
    public func cast(expression e: String, from source: GIRType) -> String? {
        guard let conversion = conversions[source] else { return nil }
        return conversion.castFromTarget(expression: e)
    }

    /// Equality check for a type.

    public let isa: TypeReference?
    /// Indicatow whether this type is an alias that doesn't need casting
    public let isAlias: Bool
    /// Dictionary of possible type conversion (cast) operations to target types.
    /// - Note: The index into the array is the level of constness and indirection*2,
    /// e.g., `0` is direct, non-const, `1` is direct and `const`, `2` is a single-level,
    /// mutable pointer, `3`, is a single-level immutable pointer, `4` is a mutable pointer
    /// to a pointer, `5` is an immutable pointer to a pointer, etc.
    public var conversions: [GIRType : [TypeConversion]] = [:]

    /// Designated initialiser for a GIR type
    /// - Parameters:
