adds code gen for optional scalars in swift (#6038)

Adds swift test code

Replaces if statments

Adds swift to supported languages for optionals

Moved std::string to auto

Adds nullable scalars support in object api
This commit is contained in:
mustiikhalil
2020-07-25 17:59:34 +03:00
committed by GitHub
parent 82fac326c5
commit d76e93f277
11 changed files with 365 additions and 126 deletions

View File

@@ -3457,7 +3457,7 @@ void NullableScalarsTest() {
// Test if nullable scalars are allowed for each language.
const int kNumLanguages = 17;
const auto supported = flatbuffers::IDLOptions::kRust;
const auto supported = (flatbuffers::IDLOptions::kRust | flatbuffers::IDLOptions::kSwift);
for (int lang=0; lang<kNumLanguages; lang++) {
flatbuffers::IDLOptions opts;
opts.lang_to_generate |= 1 << lang;