mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 22:40:03 +00:00
Fix TS object API generation of schema containing array of enumeration having no zero default (#8832)
* set the array constructor to fill with minvalue * add regression generation test
This commit is contained in:
12
tests/non_zero_enum.fbs
Normal file
12
tests/non_zero_enum.fbs
Normal file
@@ -0,0 +1,12 @@
|
||||
enum NonZero: ubyte {
|
||||
VAL = 1,
|
||||
}
|
||||
|
||||
struct NonZeroArrayStruct {
|
||||
data: [NonZero:4];
|
||||
}
|
||||
|
||||
table NonZeroVectorTable {
|
||||
values: [NonZero];
|
||||
value: NonZero = VAL;
|
||||
}
|
||||
@@ -94,6 +94,11 @@ flatc(
|
||||
data="../unicode_test.json",
|
||||
)
|
||||
|
||||
flatc(
|
||||
options=["--ts", "--gen-object-api"],
|
||||
schema="../non_zero_enum.fbs",
|
||||
)
|
||||
|
||||
flatc(
|
||||
options=[
|
||||
"--ts",
|
||||
|
||||
Reference in New Issue
Block a user