mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 06:13:05 +00:00
chore: emit more reasonable error message when using incomplete type in struct (#7678)
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -473,6 +473,10 @@ inline bool IsStruct(const Type &type) {
|
||||
return type.base_type == BASE_TYPE_STRUCT && type.struct_def->fixed;
|
||||
}
|
||||
|
||||
inline bool IsIncompleteStruct(const Type &type) {
|
||||
return type.base_type == BASE_TYPE_STRUCT && type.struct_def->predecl;
|
||||
}
|
||||
|
||||
inline bool IsTable(const Type &type) {
|
||||
return type.base_type == BASE_TYPE_STRUCT && !type.struct_def->fixed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user