mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-16 17:22:21 +00:00
Rust structz (#6539)
* Rust structz * struct of structs test * swift tmp variables Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -935,8 +935,8 @@ class SwiftGenerator : public BaseGenerator {
|
||||
auto type = GenType(field.value.type);
|
||||
code_.SetValue("VALUENAME", name);
|
||||
if (IsStruct(field.value.type)) {
|
||||
code_ += "var _v = _t.{{VALUENAME}}";
|
||||
code_ += "_{{VALUENAME}} = _v.unpack()";
|
||||
code_ += "var _v{{VALUENAME}} = _t.{{VALUENAME}}";
|
||||
code_ += "_{{VALUENAME}} = _v{{VALUENAME}}.unpack()";
|
||||
continue;
|
||||
}
|
||||
std::string is_enum = IsEnum(field.value.type) ? ".value" : "";
|
||||
|
||||
Reference in New Issue
Block a user