[Swift] RFC: Switch Swift namespace from public enum to ordinary concat with _ (#6045)

This PR attempts to switch namespace from public enum back to ordinary
concat with _ in Swift. This kept style similar with protobuf, but
different from other popular style guide in Swift.

This is needed because previously, when we do `public enum`, we don't
really know when to declare and when to extend (extension). With namespace
implementation in this PR, there is no such ambiguity.
This commit is contained in:
Liu Liu
2020-07-27 01:06:11 -07:00
committed by GitHub
parent 18b015d25a
commit 5d052f4e55
7 changed files with 524 additions and 587 deletions

View File

@@ -82,9 +82,9 @@ final class FlatBuffersUnionTests: XCTestCase {
let characterType: [Character] = [.belle, .mulan, .bookfan]
let characters = [
fb.create(struct: createBookReader(booksRead: 7), type: BookReader.self),
fb.create(struct: BookReader.createBookReader(booksRead: 7), type: BookReader.self),
attack,
fb.create(struct: createBookReader(booksRead: 2), type: BookReader.self),
fb.create(struct: BookReader.createBookReader(booksRead: 2), type: BookReader.self),
]
let types = fb.createVector(characterType)
let characterVector = fb.createVector(ofOffsets: characters)