mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-16 09:12:22 +00:00
[C++] Fix compile failure on Object API union construction for struct member (#6923)
* Add dedicated traits to Object API version of unions. * Add suppression for unused parameters on unions of structs.
This commit is contained in:
@@ -22,6 +22,19 @@ union Character {
|
||||
Unused: string
|
||||
}
|
||||
|
||||
struct FallingTub {
|
||||
weight: int;
|
||||
}
|
||||
|
||||
table HandFan {
|
||||
length: int;
|
||||
}
|
||||
|
||||
union Gadget {
|
||||
FallingTub,
|
||||
HandFan,
|
||||
}
|
||||
|
||||
table Movie {
|
||||
main_character: Character;
|
||||
characters: [Character];
|
||||
|
||||
Reference in New Issue
Block a user