You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I only tested this in Rust (since that was easiest for me), but I imagine this would cause issues in other languages as well.
If I define an enum in a FlatBuffer Schema file that has more fields that the underlying integral type can store, it leads to compiler errors in Rust (that is, flatc generates Rust code without error, but that generated code will not compile).
A quick test case:
Create a new Rust project: $ cargo new fb-enum-test && cd fb-enum-test
Add the flatbuffers crate to the project: $ echo 'flatbuffers = "0.5"' >> Cargo.toml
I only tested this in Rust (since that was easiest for me), but I imagine this would cause issues in other languages as well.
If I define an enum in a FlatBuffer Schema file that has more fields that the underlying integral type can store, it leads to compiler errors in Rust (that is,
flatc
generates Rust code without error, but that generated code will not compile).A quick test case:
$ cargo new fb-enum-test && cd fb-enum-test
flatbuffers
crate to the project:$ echo 'flatbuffers = "0.5"' >> Cargo.toml
src/main.rs
:too_many_enums.fbs
, which looks like this (not using the literal...
field, but filling in all 257 fields):$ flatc -r -o src too_many_enums.fbs && cargo build
This last step will yield the following Rust compilation error:
Platform details:
flatc
version:The text was updated successfully, but these errors were encountered: