mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-02 00:43:57 +00:00
Fix inconsistent Python union creator function naming (#8981)
This commit is contained in:
21
tests/union_name_test.fbs
Normal file
21
tests/union_name_test.fbs
Normal file
@@ -0,0 +1,21 @@
|
||||
// Test for union creator naming consistency (issue #8843).
|
||||
// Uses non-UpperCamel union name to verify that Function() naming
|
||||
// is used consistently for both definition and call site.
|
||||
|
||||
namespace union_name_test;
|
||||
|
||||
table Foo {
|
||||
val: int;
|
||||
}
|
||||
|
||||
table Bar {
|
||||
name: string;
|
||||
}
|
||||
|
||||
union my_test_union { Foo, Bar }
|
||||
|
||||
table Container {
|
||||
u: my_test_union;
|
||||
}
|
||||
|
||||
root_type Container;
|
||||
Reference in New Issue
Block a user