mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 19:04:12 +00:00
Adds implementation flag for swift (#7202)
* Adds implementation flag for swift Forces internal flag when using @_implementationOnly in swift Fixes access type for verifier functions & encoder functions Updates generated code * Addresses PR comments & adds a code gen dir within the swift tests * Adds test case for no-include * Fixes code gen script Removes prefix
This commit is contained in:
@@ -830,7 +830,7 @@ internal struct MyGame_Example_TestSimpleTableWithEnum: FlatBufferObject, Verifi
|
||||
return MyGame_Example_TestSimpleTableWithEnum.endTestSimpleTableWithEnum(&builder, start: __root)
|
||||
}
|
||||
|
||||
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
|
||||
internal static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
|
||||
var _v = try verifier.visitTable(at: position)
|
||||
try _v.visit(field: VTOFFSET.color.p, fieldName: "color", required: false, type: MyGame_Example_Color.self)
|
||||
_v.finish()
|
||||
@@ -842,7 +842,7 @@ extension MyGame_Example_TestSimpleTableWithEnum: Encodable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case color = "color"
|
||||
}
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
internal func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
if color != .green {
|
||||
try container.encodeIfPresent(color, forKey: .color)
|
||||
|
||||
Reference in New Issue
Block a user