mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
[Python] Verify EnumDef is not generated in GenUnionCreator (#6903)
* [Python] Verify EnumDef is not generated in GenUnionCreator * update test output
This commit is contained in:
@@ -1595,6 +1595,8 @@ class PythonGenerator : public BaseGenerator {
|
||||
|
||||
// Creates an union object based on union type.
|
||||
void GenUnionCreator(const EnumDef &enum_def, std::string *code_ptr) {
|
||||
if (enum_def.generated) return;
|
||||
|
||||
auto &code = *code_ptr;
|
||||
auto union_name = MakeUpperCamel(enum_def);
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
# namespace: NamespaceB
|
||||
|
||||
class UnionInNestedNS(object):
|
||||
NONE = 0
|
||||
TableInNestedNS = 1
|
||||
|
||||
|
||||
def UnionInNestedNSCreator(unionType, table):
|
||||
from flatbuffers.table import Table
|
||||
|
||||
Reference in New Issue
Block a user