diff --git a/Protos/SwiftProtobufTests/generated_swift_names_enum_cases.proto b/Protos/SwiftProtobufTests/generated_swift_names_enum_cases.proto index d57d0e3a28..496efbeb53 100644 --- a/Protos/SwiftProtobufTests/generated_swift_names_enum_cases.proto +++ b/Protos/SwiftProtobufTests/generated_swift_names_enum_cases.proto @@ -172,14 +172,14 @@ enum GeneratedSwiftReservedEnum { Collection = 165; com = 166; comma = 167; - CommonMessageConformances = 168; - consumedBytes = 169; - contentsOf = 170; - count = 171; - countVarintsInBuffer = 172; - csharpNamespace = 173; - ctype = 174; - customCodable = 175; + consumedBytes = 168; + contentsOf = 169; + count = 170; + countVarintsInBuffer = 171; + csharpNamespace = 172; + ctype = 173; + customCodable = 174; + CustomDebugStringConvertible = 175; d = 176; Data = 177; dataResult = 178; diff --git a/Protos/SwiftProtobufTests/generated_swift_names_enums.proto b/Protos/SwiftProtobufTests/generated_swift_names_enums.proto index 9e3a08b656..34f234f232 100644 --- a/Protos/SwiftProtobufTests/generated_swift_names_enums.proto +++ b/Protos/SwiftProtobufTests/generated_swift_names_enums.proto @@ -171,7 +171,6 @@ message GeneratedSwiftReservedEnums { enum Collection { NONE_Collection = 0; } enum com { NONE_com = 0; } enum comma { NONE_comma = 0; } - enum CommonMessageConformances { NONE_CommonMessageConformances = 0; } enum consumedBytes { NONE_consumedBytes = 0; } enum contentsOf { NONE_contentsOf = 0; } enum count { NONE_count = 0; } @@ -179,6 +178,7 @@ message GeneratedSwiftReservedEnums { enum csharpNamespace { NONE_csharpNamespace = 0; } enum ctype { NONE_ctype = 0; } enum customCodable { NONE_customCodable = 0; } + enum CustomDebugStringConvertible { NONE_CustomDebugStringConvertible = 0; } enum d { NONE_d = 0; } enum Data { NONE_Data = 0; } enum dataResult { NONE_dataResult = 0; } diff --git a/Protos/SwiftProtobufTests/generated_swift_names_fields.proto b/Protos/SwiftProtobufTests/generated_swift_names_fields.proto index 945b042e4d..001aaaf696 100644 --- a/Protos/SwiftProtobufTests/generated_swift_names_fields.proto +++ b/Protos/SwiftProtobufTests/generated_swift_names_fields.proto @@ -171,14 +171,14 @@ message GeneratedSwiftReservedFields { int32 Collection = 165; int32 com = 166; int32 comma = 167; - int32 CommonMessageConformances = 168; - int32 consumedBytes = 169; - int32 contentsOf = 170; - int32 count = 171; - int32 countVarintsInBuffer = 172; - int32 csharpNamespace = 173; - int32 ctype = 174; - int32 customCodable = 175; + int32 consumedBytes = 168; + int32 contentsOf = 169; + int32 count = 170; + int32 countVarintsInBuffer = 171; + int32 csharpNamespace = 172; + int32 ctype = 173; + int32 customCodable = 174; + int32 CustomDebugStringConvertible = 175; int32 d = 176; int32 Data = 177; int32 dataResult = 178; diff --git a/Protos/SwiftProtobufTests/generated_swift_names_messages.proto b/Protos/SwiftProtobufTests/generated_swift_names_messages.proto index c49718ebe2..a489bda21d 100644 --- a/Protos/SwiftProtobufTests/generated_swift_names_messages.proto +++ b/Protos/SwiftProtobufTests/generated_swift_names_messages.proto @@ -171,7 +171,6 @@ message GeneratedSwiftReservedMessages { message Collection { int32 Collection = 1; } message com { int32 com = 1; } message comma { int32 comma = 1; } - message CommonMessageConformances { int32 CommonMessageConformances = 1; } message consumedBytes { int32 consumedBytes = 1; } message contentsOf { int32 contentsOf = 1; } message count { int32 count = 1; } @@ -179,6 +178,7 @@ message GeneratedSwiftReservedMessages { message csharpNamespace { int32 csharpNamespace = 1; } message ctype { int32 ctype = 1; } message customCodable { int32 customCodable = 1; } + message CustomDebugStringConvertible { int32 CustomDebugStringConvertible = 1; } message d { int32 d = 1; } message Data { int32 Data = 1; } message dataResult { int32 dataResult = 1; } diff --git a/Reference/SwiftProtobufTests/generated_swift_names_enum_cases.pb.swift b/Reference/SwiftProtobufTests/generated_swift_names_enum_cases.pb.swift index 2802c75e7c..de3f35a45e 100644 --- a/Reference/SwiftProtobufTests/generated_swift_names_enum_cases.pb.swift +++ b/Reference/SwiftProtobufTests/generated_swift_names_enum_cases.pb.swift @@ -194,14 +194,14 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, case collection // = 165 case com // = 166 case comma // = 167 - case commonMessageConformances // = 168 - case consumedBytes // = 169 - case contentsOf // = 170 - case count // = 171 - case countVarintsInBuffer // = 172 - case csharpNamespace // = 173 - case ctype // = 174 - case customCodable // = 175 + case consumedBytes // = 168 + case contentsOf // = 169 + case count // = 170 + case countVarintsInBuffer // = 171 + case csharpNamespace // = 172 + case ctype // = 173 + case customCodable // = 174 + case customDebugStringConvertible // = 175 case d // = 176 case data // = 177 case dataResult // = 178 @@ -1178,14 +1178,14 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, case 165: self = .collection case 166: self = .com case 167: self = .comma - case 168: self = .commonMessageConformances - case 169: self = .consumedBytes - case 170: self = .contentsOf - case 171: self = .count - case 172: self = .countVarintsInBuffer - case 173: self = .csharpNamespace - case 174: self = .ctype - case 175: self = .customCodable + case 168: self = .consumedBytes + case 169: self = .contentsOf + case 170: self = .count + case 171: self = .countVarintsInBuffer + case 172: self = .csharpNamespace + case 173: self = .ctype + case 174: self = .customCodable + case 175: self = .customDebugStringConvertible case 176: self = .d case 177: self = .data case 178: self = .dataResult @@ -2160,14 +2160,14 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, case .collection: return 165 case .com: return 166 case .comma: return 167 - case .commonMessageConformances: return 168 - case .consumedBytes: return 169 - case .contentsOf: return 170 - case .count: return 171 - case .countVarintsInBuffer: return 172 - case .csharpNamespace: return 173 - case .ctype: return 174 - case .customCodable: return 175 + case .consumedBytes: return 168 + case .contentsOf: return 169 + case .count: return 170 + case .countVarintsInBuffer: return 171 + case .csharpNamespace: return 172 + case .ctype: return 173 + case .customCodable: return 174 + case .customDebugStringConvertible: return 175 case .d: return 176 case .data: return 177 case .dataResult: return 178 @@ -3150,7 +3150,6 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, .collection, .com, .comma, - .commonMessageConformances, .consumedBytes, .contentsOf, .count, @@ -3158,6 +3157,7 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, .csharpNamespace, .ctype, .customCodable, + .customDebugStringConvertible, .d, .data, .dataResult, @@ -4134,14 +4134,14 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf. 165: .same(proto: "Collection"), 166: .same(proto: "com"), 167: .same(proto: "comma"), - 168: .same(proto: "CommonMessageConformances"), - 169: .same(proto: "consumedBytes"), - 170: .same(proto: "contentsOf"), - 171: .same(proto: "count"), - 172: .same(proto: "countVarintsInBuffer"), - 173: .same(proto: "csharpNamespace"), - 174: .same(proto: "ctype"), - 175: .same(proto: "customCodable"), + 168: .same(proto: "consumedBytes"), + 169: .same(proto: "contentsOf"), + 170: .same(proto: "count"), + 171: .same(proto: "countVarintsInBuffer"), + 172: .same(proto: "csharpNamespace"), + 173: .same(proto: "ctype"), + 174: .same(proto: "customCodable"), + 175: .same(proto: "CustomDebugStringConvertible"), 176: .same(proto: "d"), 177: .same(proto: "Data"), 178: .same(proto: "dataResult"), diff --git a/Reference/SwiftProtobufTests/generated_swift_names_enums.pb.swift b/Reference/SwiftProtobufTests/generated_swift_names_enums.pb.swift index 3f86556375..0151470b28 100644 --- a/Reference/SwiftProtobufTests/generated_swift_names_enums.pb.swift +++ b/Reference/SwiftProtobufTests/generated_swift_names_enums.pb.swift @@ -5041,36 +5041,6 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums: Sendable { } - enum CommonMessageConformances: SwiftProtobuf.Enum, Swift.CaseIterable { - typealias RawValue = Int - case noneCommonMessageConformances // = 0 - case UNRECOGNIZED(Int) - - init() { - self = .noneCommonMessageConformances - } - - init?(rawValue: Int) { - switch rawValue { - case 0: self = .noneCommonMessageConformances - default: self = .UNRECOGNIZED(rawValue) - } - } - - var rawValue: Int { - switch self { - case .noneCommonMessageConformances: return 0 - case .UNRECOGNIZED(let i): return i - } - } - - // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.CommonMessageConformances] = [ - .noneCommonMessageConformances, - ] - - } - enum consumedBytes: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case noneConsumedBytes // = 0 @@ -5281,6 +5251,36 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums: Sendable { } + enum CustomDebugStringConvertible: SwiftProtobuf.Enum, Swift.CaseIterable { + typealias RawValue = Int + case noneCustomDebugStringConvertible // = 0 + case UNRECOGNIZED(Int) + + init() { + self = .noneCustomDebugStringConvertible + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .noneCustomDebugStringConvertible + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .noneCustomDebugStringConvertible: return 0 + case .UNRECOGNIZED(let i): return i + } + } + + // The compiler won't synthesize support with the UNRECOGNIZED case. + static let allCases: [SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.CustomDebugStringConvertible] = [ + .noneCustomDebugStringConvertible, + ] + + } + enum d: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case noneD // = 0 @@ -30309,12 +30309,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.comma: SwiftPr ] } -extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.CommonMessageConformances: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "NONE_CommonMessageConformances"), - ] -} - extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.consumedBytes: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NONE_consumedBytes"), @@ -30357,6 +30351,12 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.customCodable: ] } +extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.CustomDebugStringConvertible: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "NONE_CustomDebugStringConvertible"), + ] +} + extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.d: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NONE_d"), diff --git a/Reference/SwiftProtobufTests/generated_swift_names_fields.pb.swift b/Reference/SwiftProtobufTests/generated_swift_names_fields.pb.swift index d80d3fdcc5..8605f9e4dc 100644 --- a/Reference/SwiftProtobufTests/generated_swift_names_fields.pb.swift +++ b/Reference/SwiftProtobufTests/generated_swift_names_fields.pb.swift @@ -864,11 +864,6 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: @unchecked Send set {_uniqueStorage()._comma = newValue} } - var commonMessageConformances: Int32 { - get {return _storage._commonMessageConformances} - set {_uniqueStorage()._commonMessageConformances = newValue} - } - var consumedBytes: Int32 { get {return _storage._consumedBytes} set {_uniqueStorage()._consumedBytes = newValue} @@ -904,6 +899,11 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: @unchecked Send set {_uniqueStorage()._customCodable = newValue} } + var customDebugStringConvertible: Int32 { + get {return _storage._customDebugStringConvertible} + set {_uniqueStorage()._customDebugStringConvertible = newValue} + } + var d: Int32 { get {return _storage._d} set {_uniqueStorage()._d = newValue} @@ -5085,14 +5085,14 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu 165: .same(proto: "Collection"), 166: .same(proto: "com"), 167: .same(proto: "comma"), - 168: .same(proto: "CommonMessageConformances"), - 169: .same(proto: "consumedBytes"), - 170: .same(proto: "contentsOf"), - 171: .same(proto: "count"), - 172: .same(proto: "countVarintsInBuffer"), - 173: .same(proto: "csharpNamespace"), - 174: .same(proto: "ctype"), - 175: .same(proto: "customCodable"), + 168: .same(proto: "consumedBytes"), + 169: .same(proto: "contentsOf"), + 170: .same(proto: "count"), + 171: .same(proto: "countVarintsInBuffer"), + 172: .same(proto: "csharpNamespace"), + 173: .same(proto: "ctype"), + 174: .same(proto: "customCodable"), + 175: .same(proto: "CustomDebugStringConvertible"), 176: .same(proto: "d"), 177: .same(proto: "Data"), 178: .same(proto: "dataResult"), @@ -6063,7 +6063,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu var _collection: Int32 = 0 var _com: Int32 = 0 var _comma: Int32 = 0 - var _commonMessageConformances: Int32 = 0 var _consumedBytes: Int32 = 0 var _contentsOf: Int32 = 0 var _count: Int32 = 0 @@ -6071,6 +6070,7 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu var _csharpNamespace: Int32 = 0 var _ctype: Int32 = 0 var _customCodable: Int32 = 0 + var _customDebugStringConvertible: Int32 = 0 var _d: Int32 = 0 var _data: Int32 = 0 var _dataResult: Int32 = 0 @@ -7052,7 +7052,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu _collection = source._collection _com = source._com _comma = source._comma - _commonMessageConformances = source._commonMessageConformances _consumedBytes = source._consumedBytes _contentsOf = source._contentsOf _count = source._count @@ -7060,6 +7059,7 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu _csharpNamespace = source._csharpNamespace _ctype = source._ctype _customCodable = source._customCodable + _customDebugStringConvertible = source._customDebugStringConvertible _d = source._d _data = source._data _dataResult = source._dataResult @@ -8045,14 +8045,14 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu case 165: try { try decoder.decodeSingularInt32Field(value: &_storage._collection) }() case 166: try { try decoder.decodeSingularInt32Field(value: &_storage._com) }() case 167: try { try decoder.decodeSingularInt32Field(value: &_storage._comma) }() - case 168: try { try decoder.decodeSingularInt32Field(value: &_storage._commonMessageConformances) }() - case 169: try { try decoder.decodeSingularInt32Field(value: &_storage._consumedBytes) }() - case 170: try { try decoder.decodeSingularInt32Field(value: &_storage._contentsOf) }() - case 171: try { try decoder.decodeSingularInt32Field(value: &_storage._count) }() - case 172: try { try decoder.decodeSingularInt32Field(value: &_storage._countVarintsInBuffer) }() - case 173: try { try decoder.decodeSingularInt32Field(value: &_storage._csharpNamespace) }() - case 174: try { try decoder.decodeSingularInt32Field(value: &_storage._ctype) }() - case 175: try { try decoder.decodeSingularInt32Field(value: &_storage._customCodable) }() + case 168: try { try decoder.decodeSingularInt32Field(value: &_storage._consumedBytes) }() + case 169: try { try decoder.decodeSingularInt32Field(value: &_storage._contentsOf) }() + case 170: try { try decoder.decodeSingularInt32Field(value: &_storage._count) }() + case 171: try { try decoder.decodeSingularInt32Field(value: &_storage._countVarintsInBuffer) }() + case 172: try { try decoder.decodeSingularInt32Field(value: &_storage._csharpNamespace) }() + case 173: try { try decoder.decodeSingularInt32Field(value: &_storage._ctype) }() + case 174: try { try decoder.decodeSingularInt32Field(value: &_storage._customCodable) }() + case 175: try { try decoder.decodeSingularInt32Field(value: &_storage._customDebugStringConvertible) }() case 176: try { try decoder.decodeSingularInt32Field(value: &_storage._d) }() case 177: try { try decoder.decodeSingularInt32Field(value: &_storage._data) }() case 178: try { try decoder.decodeSingularInt32Field(value: &_storage._dataResult) }() @@ -9362,29 +9362,29 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu if _storage._comma != 0 { try visitor.visitSingularInt32Field(value: _storage._comma, fieldNumber: 167) } - if _storage._commonMessageConformances != 0 { - try visitor.visitSingularInt32Field(value: _storage._commonMessageConformances, fieldNumber: 168) - } if _storage._consumedBytes != 0 { - try visitor.visitSingularInt32Field(value: _storage._consumedBytes, fieldNumber: 169) + try visitor.visitSingularInt32Field(value: _storage._consumedBytes, fieldNumber: 168) } if _storage._contentsOf != 0 { - try visitor.visitSingularInt32Field(value: _storage._contentsOf, fieldNumber: 170) + try visitor.visitSingularInt32Field(value: _storage._contentsOf, fieldNumber: 169) } if _storage._count != 0 { - try visitor.visitSingularInt32Field(value: _storage._count, fieldNumber: 171) + try visitor.visitSingularInt32Field(value: _storage._count, fieldNumber: 170) } if _storage._countVarintsInBuffer != 0 { - try visitor.visitSingularInt32Field(value: _storage._countVarintsInBuffer, fieldNumber: 172) + try visitor.visitSingularInt32Field(value: _storage._countVarintsInBuffer, fieldNumber: 171) } if _storage._csharpNamespace != 0 { - try visitor.visitSingularInt32Field(value: _storage._csharpNamespace, fieldNumber: 173) + try visitor.visitSingularInt32Field(value: _storage._csharpNamespace, fieldNumber: 172) } if _storage._ctype != 0 { - try visitor.visitSingularInt32Field(value: _storage._ctype, fieldNumber: 174) + try visitor.visitSingularInt32Field(value: _storage._ctype, fieldNumber: 173) } if _storage._customCodable != 0 { - try visitor.visitSingularInt32Field(value: _storage._customCodable, fieldNumber: 175) + try visitor.visitSingularInt32Field(value: _storage._customCodable, fieldNumber: 174) + } + if _storage._customDebugStringConvertible != 0 { + try visitor.visitSingularInt32Field(value: _storage._customDebugStringConvertible, fieldNumber: 175) } if _storage._d != 0 { try visitor.visitSingularInt32Field(value: _storage._d, fieldNumber: 176) @@ -11962,7 +11962,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu if _storage._collection != rhs_storage._collection {return false} if _storage._com != rhs_storage._com {return false} if _storage._comma != rhs_storage._comma {return false} - if _storage._commonMessageConformances != rhs_storage._commonMessageConformances {return false} if _storage._consumedBytes != rhs_storage._consumedBytes {return false} if _storage._contentsOf != rhs_storage._contentsOf {return false} if _storage._count != rhs_storage._count {return false} @@ -11970,6 +11969,7 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu if _storage._csharpNamespace != rhs_storage._csharpNamespace {return false} if _storage._ctype != rhs_storage._ctype {return false} if _storage._customCodable != rhs_storage._customCodable {return false} + if _storage._customDebugStringConvertible != rhs_storage._customDebugStringConvertible {return false} if _storage._d != rhs_storage._d {return false} if _storage._data != rhs_storage._data {return false} if _storage._dataResult != rhs_storage._dataResult {return false} diff --git a/Reference/SwiftProtobufTests/generated_swift_names_messages.pb.swift b/Reference/SwiftProtobufTests/generated_swift_names_messages.pb.swift index cdd17bb4fa..7e77d6f19f 100644 --- a/Reference/SwiftProtobufTests/generated_swift_names_messages.pb.swift +++ b/Reference/SwiftProtobufTests/generated_swift_names_messages.pb.swift @@ -2035,18 +2035,6 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages: Sendable { init() {} } - struct CommonMessageConformances: Sendable { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var commonMessageConformances: Int32 = 0 - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} - } - struct consumedBytes: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -2131,6 +2119,18 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages: Sendable { init() {} } + struct CustomDebugStringConvertible: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var customDebugStringConvertible: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + } + struct d: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -17101,38 +17101,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.comma: Swif } } -extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CommonMessageConformances: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.protoMessageName + ".CommonMessageConformances" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "CommonMessageConformances"), - ] - - mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.commonMessageConformances) }() - default: break - } - } - } - - func traverse(visitor: inout V) throws { - if self.commonMessageConformances != 0 { - try visitor.visitSingularInt32Field(value: self.commonMessageConformances, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CommonMessageConformances, rhs: SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CommonMessageConformances) -> Bool { - if lhs.commonMessageConformances != rhs.commonMessageConformances {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.consumedBytes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.protoMessageName + ".consumedBytes" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -17357,6 +17325,38 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.customCodab } } +extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CustomDebugStringConvertible: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.protoMessageName + ".CustomDebugStringConvertible" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "CustomDebugStringConvertible"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt32Field(value: &self.customDebugStringConvertible) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.customDebugStringConvertible != 0 { + try visitor.visitSingularInt32Field(value: self.customDebugStringConvertible, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CustomDebugStringConvertible, rhs: SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CustomDebugStringConvertible) -> Bool { + if lhs.customDebugStringConvertible != rhs.customDebugStringConvertible {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.d: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.protoMessageName + ".d" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ diff --git a/Sources/Conformance/test_messages_edition2023.pb.swift b/Sources/Conformance/test_messages_edition2023.pb.swift index c7da5bf79c..45743b29d0 100644 --- a/Sources/Conformance/test_messages_edition2023.pb.swift +++ b/Sources/Conformance/test_messages_edition2023.pb.swift @@ -20,7 +20,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _3 } -enum ProtobufTestMessages_Editions_ForeignEnumEdition2023: SwiftProtobuf.Enum { +enum ProtobufTestMessages_Editions_ForeignEnumEdition2023: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case foreignFoo // = 0 case foreignBar // = 1 @@ -721,7 +721,7 @@ struct ProtobufTestMessages_Editions_TestAllTypesEdition2023: SwiftProtobuf.Exte } - enum NestedEnum: SwiftProtobuf.Enum { + enum NestedEnum: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case foo // = 0 case bar // = 1 diff --git a/Tests/SwiftProtobufTests/generated_swift_names_enum_cases.pb.swift b/Tests/SwiftProtobufTests/generated_swift_names_enum_cases.pb.swift index 2802c75e7c..de3f35a45e 100644 --- a/Tests/SwiftProtobufTests/generated_swift_names_enum_cases.pb.swift +++ b/Tests/SwiftProtobufTests/generated_swift_names_enum_cases.pb.swift @@ -194,14 +194,14 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, case collection // = 165 case com // = 166 case comma // = 167 - case commonMessageConformances // = 168 - case consumedBytes // = 169 - case contentsOf // = 170 - case count // = 171 - case countVarintsInBuffer // = 172 - case csharpNamespace // = 173 - case ctype // = 174 - case customCodable // = 175 + case consumedBytes // = 168 + case contentsOf // = 169 + case count // = 170 + case countVarintsInBuffer // = 171 + case csharpNamespace // = 172 + case ctype // = 173 + case customCodable // = 174 + case customDebugStringConvertible // = 175 case d // = 176 case data // = 177 case dataResult // = 178 @@ -1178,14 +1178,14 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, case 165: self = .collection case 166: self = .com case 167: self = .comma - case 168: self = .commonMessageConformances - case 169: self = .consumedBytes - case 170: self = .contentsOf - case 171: self = .count - case 172: self = .countVarintsInBuffer - case 173: self = .csharpNamespace - case 174: self = .ctype - case 175: self = .customCodable + case 168: self = .consumedBytes + case 169: self = .contentsOf + case 170: self = .count + case 171: self = .countVarintsInBuffer + case 172: self = .csharpNamespace + case 173: self = .ctype + case 174: self = .customCodable + case 175: self = .customDebugStringConvertible case 176: self = .d case 177: self = .data case 178: self = .dataResult @@ -2160,14 +2160,14 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, case .collection: return 165 case .com: return 166 case .comma: return 167 - case .commonMessageConformances: return 168 - case .consumedBytes: return 169 - case .contentsOf: return 170 - case .count: return 171 - case .countVarintsInBuffer: return 172 - case .csharpNamespace: return 173 - case .ctype: return 174 - case .customCodable: return 175 + case .consumedBytes: return 168 + case .contentsOf: return 169 + case .count: return 170 + case .countVarintsInBuffer: return 171 + case .csharpNamespace: return 172 + case .ctype: return 173 + case .customCodable: return 174 + case .customDebugStringConvertible: return 175 case .d: return 176 case .data: return 177 case .dataResult: return 178 @@ -3150,7 +3150,6 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, .collection, .com, .comma, - .commonMessageConformances, .consumedBytes, .contentsOf, .count, @@ -3158,6 +3157,7 @@ enum SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf.Enum, .csharpNamespace, .ctype, .customCodable, + .customDebugStringConvertible, .d, .data, .dataResult, @@ -4134,14 +4134,14 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnum: SwiftProtobuf. 165: .same(proto: "Collection"), 166: .same(proto: "com"), 167: .same(proto: "comma"), - 168: .same(proto: "CommonMessageConformances"), - 169: .same(proto: "consumedBytes"), - 170: .same(proto: "contentsOf"), - 171: .same(proto: "count"), - 172: .same(proto: "countVarintsInBuffer"), - 173: .same(proto: "csharpNamespace"), - 174: .same(proto: "ctype"), - 175: .same(proto: "customCodable"), + 168: .same(proto: "consumedBytes"), + 169: .same(proto: "contentsOf"), + 170: .same(proto: "count"), + 171: .same(proto: "countVarintsInBuffer"), + 172: .same(proto: "csharpNamespace"), + 173: .same(proto: "ctype"), + 174: .same(proto: "customCodable"), + 175: .same(proto: "CustomDebugStringConvertible"), 176: .same(proto: "d"), 177: .same(proto: "Data"), 178: .same(proto: "dataResult"), diff --git a/Tests/SwiftProtobufTests/generated_swift_names_enums.pb.swift b/Tests/SwiftProtobufTests/generated_swift_names_enums.pb.swift index 3f86556375..0151470b28 100644 --- a/Tests/SwiftProtobufTests/generated_swift_names_enums.pb.swift +++ b/Tests/SwiftProtobufTests/generated_swift_names_enums.pb.swift @@ -5041,36 +5041,6 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums: Sendable { } - enum CommonMessageConformances: SwiftProtobuf.Enum, Swift.CaseIterable { - typealias RawValue = Int - case noneCommonMessageConformances // = 0 - case UNRECOGNIZED(Int) - - init() { - self = .noneCommonMessageConformances - } - - init?(rawValue: Int) { - switch rawValue { - case 0: self = .noneCommonMessageConformances - default: self = .UNRECOGNIZED(rawValue) - } - } - - var rawValue: Int { - switch self { - case .noneCommonMessageConformances: return 0 - case .UNRECOGNIZED(let i): return i - } - } - - // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.CommonMessageConformances] = [ - .noneCommonMessageConformances, - ] - - } - enum consumedBytes: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case noneConsumedBytes // = 0 @@ -5281,6 +5251,36 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums: Sendable { } + enum CustomDebugStringConvertible: SwiftProtobuf.Enum, Swift.CaseIterable { + typealias RawValue = Int + case noneCustomDebugStringConvertible // = 0 + case UNRECOGNIZED(Int) + + init() { + self = .noneCustomDebugStringConvertible + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .noneCustomDebugStringConvertible + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .noneCustomDebugStringConvertible: return 0 + case .UNRECOGNIZED(let i): return i + } + } + + // The compiler won't synthesize support with the UNRECOGNIZED case. + static let allCases: [SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.CustomDebugStringConvertible] = [ + .noneCustomDebugStringConvertible, + ] + + } + enum d: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case noneD // = 0 @@ -30309,12 +30309,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.comma: SwiftPr ] } -extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.CommonMessageConformances: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "NONE_CommonMessageConformances"), - ] -} - extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.consumedBytes: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NONE_consumedBytes"), @@ -30357,6 +30351,12 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.customCodable: ] } +extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.CustomDebugStringConvertible: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "NONE_CustomDebugStringConvertible"), + ] +} + extension SwiftProtoTesting_Generated_GeneratedSwiftReservedEnums.d: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "NONE_d"), diff --git a/Tests/SwiftProtobufTests/generated_swift_names_fields.pb.swift b/Tests/SwiftProtobufTests/generated_swift_names_fields.pb.swift index d80d3fdcc5..8605f9e4dc 100644 --- a/Tests/SwiftProtobufTests/generated_swift_names_fields.pb.swift +++ b/Tests/SwiftProtobufTests/generated_swift_names_fields.pb.swift @@ -864,11 +864,6 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: @unchecked Send set {_uniqueStorage()._comma = newValue} } - var commonMessageConformances: Int32 { - get {return _storage._commonMessageConformances} - set {_uniqueStorage()._commonMessageConformances = newValue} - } - var consumedBytes: Int32 { get {return _storage._consumedBytes} set {_uniqueStorage()._consumedBytes = newValue} @@ -904,6 +899,11 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: @unchecked Send set {_uniqueStorage()._customCodable = newValue} } + var customDebugStringConvertible: Int32 { + get {return _storage._customDebugStringConvertible} + set {_uniqueStorage()._customDebugStringConvertible = newValue} + } + var d: Int32 { get {return _storage._d} set {_uniqueStorage()._d = newValue} @@ -5085,14 +5085,14 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu 165: .same(proto: "Collection"), 166: .same(proto: "com"), 167: .same(proto: "comma"), - 168: .same(proto: "CommonMessageConformances"), - 169: .same(proto: "consumedBytes"), - 170: .same(proto: "contentsOf"), - 171: .same(proto: "count"), - 172: .same(proto: "countVarintsInBuffer"), - 173: .same(proto: "csharpNamespace"), - 174: .same(proto: "ctype"), - 175: .same(proto: "customCodable"), + 168: .same(proto: "consumedBytes"), + 169: .same(proto: "contentsOf"), + 170: .same(proto: "count"), + 171: .same(proto: "countVarintsInBuffer"), + 172: .same(proto: "csharpNamespace"), + 173: .same(proto: "ctype"), + 174: .same(proto: "customCodable"), + 175: .same(proto: "CustomDebugStringConvertible"), 176: .same(proto: "d"), 177: .same(proto: "Data"), 178: .same(proto: "dataResult"), @@ -6063,7 +6063,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu var _collection: Int32 = 0 var _com: Int32 = 0 var _comma: Int32 = 0 - var _commonMessageConformances: Int32 = 0 var _consumedBytes: Int32 = 0 var _contentsOf: Int32 = 0 var _count: Int32 = 0 @@ -6071,6 +6070,7 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu var _csharpNamespace: Int32 = 0 var _ctype: Int32 = 0 var _customCodable: Int32 = 0 + var _customDebugStringConvertible: Int32 = 0 var _d: Int32 = 0 var _data: Int32 = 0 var _dataResult: Int32 = 0 @@ -7052,7 +7052,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu _collection = source._collection _com = source._com _comma = source._comma - _commonMessageConformances = source._commonMessageConformances _consumedBytes = source._consumedBytes _contentsOf = source._contentsOf _count = source._count @@ -7060,6 +7059,7 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu _csharpNamespace = source._csharpNamespace _ctype = source._ctype _customCodable = source._customCodable + _customDebugStringConvertible = source._customDebugStringConvertible _d = source._d _data = source._data _dataResult = source._dataResult @@ -8045,14 +8045,14 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu case 165: try { try decoder.decodeSingularInt32Field(value: &_storage._collection) }() case 166: try { try decoder.decodeSingularInt32Field(value: &_storage._com) }() case 167: try { try decoder.decodeSingularInt32Field(value: &_storage._comma) }() - case 168: try { try decoder.decodeSingularInt32Field(value: &_storage._commonMessageConformances) }() - case 169: try { try decoder.decodeSingularInt32Field(value: &_storage._consumedBytes) }() - case 170: try { try decoder.decodeSingularInt32Field(value: &_storage._contentsOf) }() - case 171: try { try decoder.decodeSingularInt32Field(value: &_storage._count) }() - case 172: try { try decoder.decodeSingularInt32Field(value: &_storage._countVarintsInBuffer) }() - case 173: try { try decoder.decodeSingularInt32Field(value: &_storage._csharpNamespace) }() - case 174: try { try decoder.decodeSingularInt32Field(value: &_storage._ctype) }() - case 175: try { try decoder.decodeSingularInt32Field(value: &_storage._customCodable) }() + case 168: try { try decoder.decodeSingularInt32Field(value: &_storage._consumedBytes) }() + case 169: try { try decoder.decodeSingularInt32Field(value: &_storage._contentsOf) }() + case 170: try { try decoder.decodeSingularInt32Field(value: &_storage._count) }() + case 171: try { try decoder.decodeSingularInt32Field(value: &_storage._countVarintsInBuffer) }() + case 172: try { try decoder.decodeSingularInt32Field(value: &_storage._csharpNamespace) }() + case 173: try { try decoder.decodeSingularInt32Field(value: &_storage._ctype) }() + case 174: try { try decoder.decodeSingularInt32Field(value: &_storage._customCodable) }() + case 175: try { try decoder.decodeSingularInt32Field(value: &_storage._customDebugStringConvertible) }() case 176: try { try decoder.decodeSingularInt32Field(value: &_storage._d) }() case 177: try { try decoder.decodeSingularInt32Field(value: &_storage._data) }() case 178: try { try decoder.decodeSingularInt32Field(value: &_storage._dataResult) }() @@ -9362,29 +9362,29 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu if _storage._comma != 0 { try visitor.visitSingularInt32Field(value: _storage._comma, fieldNumber: 167) } - if _storage._commonMessageConformances != 0 { - try visitor.visitSingularInt32Field(value: _storage._commonMessageConformances, fieldNumber: 168) - } if _storage._consumedBytes != 0 { - try visitor.visitSingularInt32Field(value: _storage._consumedBytes, fieldNumber: 169) + try visitor.visitSingularInt32Field(value: _storage._consumedBytes, fieldNumber: 168) } if _storage._contentsOf != 0 { - try visitor.visitSingularInt32Field(value: _storage._contentsOf, fieldNumber: 170) + try visitor.visitSingularInt32Field(value: _storage._contentsOf, fieldNumber: 169) } if _storage._count != 0 { - try visitor.visitSingularInt32Field(value: _storage._count, fieldNumber: 171) + try visitor.visitSingularInt32Field(value: _storage._count, fieldNumber: 170) } if _storage._countVarintsInBuffer != 0 { - try visitor.visitSingularInt32Field(value: _storage._countVarintsInBuffer, fieldNumber: 172) + try visitor.visitSingularInt32Field(value: _storage._countVarintsInBuffer, fieldNumber: 171) } if _storage._csharpNamespace != 0 { - try visitor.visitSingularInt32Field(value: _storage._csharpNamespace, fieldNumber: 173) + try visitor.visitSingularInt32Field(value: _storage._csharpNamespace, fieldNumber: 172) } if _storage._ctype != 0 { - try visitor.visitSingularInt32Field(value: _storage._ctype, fieldNumber: 174) + try visitor.visitSingularInt32Field(value: _storage._ctype, fieldNumber: 173) } if _storage._customCodable != 0 { - try visitor.visitSingularInt32Field(value: _storage._customCodable, fieldNumber: 175) + try visitor.visitSingularInt32Field(value: _storage._customCodable, fieldNumber: 174) + } + if _storage._customDebugStringConvertible != 0 { + try visitor.visitSingularInt32Field(value: _storage._customDebugStringConvertible, fieldNumber: 175) } if _storage._d != 0 { try visitor.visitSingularInt32Field(value: _storage._d, fieldNumber: 176) @@ -11962,7 +11962,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu if _storage._collection != rhs_storage._collection {return false} if _storage._com != rhs_storage._com {return false} if _storage._comma != rhs_storage._comma {return false} - if _storage._commonMessageConformances != rhs_storage._commonMessageConformances {return false} if _storage._consumedBytes != rhs_storage._consumedBytes {return false} if _storage._contentsOf != rhs_storage._contentsOf {return false} if _storage._count != rhs_storage._count {return false} @@ -11970,6 +11969,7 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedFields: SwiftProtobu if _storage._csharpNamespace != rhs_storage._csharpNamespace {return false} if _storage._ctype != rhs_storage._ctype {return false} if _storage._customCodable != rhs_storage._customCodable {return false} + if _storage._customDebugStringConvertible != rhs_storage._customDebugStringConvertible {return false} if _storage._d != rhs_storage._d {return false} if _storage._data != rhs_storage._data {return false} if _storage._dataResult != rhs_storage._dataResult {return false} diff --git a/Tests/SwiftProtobufTests/generated_swift_names_messages.pb.swift b/Tests/SwiftProtobufTests/generated_swift_names_messages.pb.swift index cdd17bb4fa..7e77d6f19f 100644 --- a/Tests/SwiftProtobufTests/generated_swift_names_messages.pb.swift +++ b/Tests/SwiftProtobufTests/generated_swift_names_messages.pb.swift @@ -2035,18 +2035,6 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages: Sendable { init() {} } - struct CommonMessageConformances: Sendable { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var commonMessageConformances: Int32 = 0 - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} - } - struct consumedBytes: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -2131,6 +2119,18 @@ struct SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages: Sendable { init() {} } + struct CustomDebugStringConvertible: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var customDebugStringConvertible: Int32 = 0 + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + } + struct d: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -17101,38 +17101,6 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.comma: Swif } } -extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CommonMessageConformances: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.protoMessageName + ".CommonMessageConformances" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "CommonMessageConformances"), - ] - - mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularInt32Field(value: &self.commonMessageConformances) }() - default: break - } - } - } - - func traverse(visitor: inout V) throws { - if self.commonMessageConformances != 0 { - try visitor.visitSingularInt32Field(value: self.commonMessageConformances, fieldNumber: 1) - } - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CommonMessageConformances, rhs: SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CommonMessageConformances) -> Bool { - if lhs.commonMessageConformances != rhs.commonMessageConformances {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.consumedBytes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.protoMessageName + ".consumedBytes" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -17357,6 +17325,38 @@ extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.customCodab } } +extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CustomDebugStringConvertible: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.protoMessageName + ".CustomDebugStringConvertible" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "CustomDebugStringConvertible"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt32Field(value: &self.customDebugStringConvertible) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if self.customDebugStringConvertible != 0 { + try visitor.visitSingularInt32Field(value: self.customDebugStringConvertible, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CustomDebugStringConvertible, rhs: SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.CustomDebugStringConvertible) -> Bool { + if lhs.customDebugStringConvertible != rhs.customDebugStringConvertible {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.d: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = SwiftProtoTesting_Generated_GeneratedSwiftReservedMessages.protoMessageName + ".d" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [