 
     /// explicit, idiomatic type reference (class if pointer to record)
     @inlinable var idiomaticClassRef: TypeReference {
-        let pointers = typeRef.knownIndirectionLevel
-        guard pointers == 1, let record = knownRecord else {
-            guard pointers == 0, let optionSet = knownBitfield else {
+        guard let record = knownRecordReference else {
+            guard typeRef.knownIndirectionLevel == 0, let optionSet = knownBitfield else {
                 return swiftReturnRef
             }
             return optionSet.typeRef

    /// or `nil` otherwise
    @inlinable
    var templateDecl: String? {
        guard typeRef.knownIndirectionLevel == 1, let record = knownRecord else {
            return nil
        }
        return record.className + "T: " + record.protocolName
    }

    /// return the swift (known) type of the receiver when used as a return value
    @inlinable

        return optionalName
    }

    /// Return a Swift template declaration for a known record that is non-nullable,
    /// or `nil` otherwise
    @inlinable
    var nonNullableTemplateDecl: String? {
        guard !isNullable || !allowNone, let record = knownRecordReference else {
            return nil
        }

        return record.className + "T: " + record.protocolName
    }

    /// return the swift (known) type of the receiver when passed as an argument
    /// Returns a template name in case of a known record
    @inlinable
    var templateTypeName: String {
        guard let record = knownRecordReference else {
            guard typeRef.knownIndirectionLevel == 0, let optionSet = knownBitfield else {
                return argumentTypeName
            }
            return optionSet.escapedName.swift
