Closed cym-Asaf closed 10 months ago
Thanks for reporting, I can reproduce on latest. I believe I have ad-hoc testet empty namespace before, though it clearly fails here. The case might seem obscure, but it is actually important in order to revert back to a top-level namespace after using another namespace.
Fixed in 05295db
Apparently conventions changed from having a null pointer as root scope to an actual scope object. Parsing empty namespace would attempt to set root scope using null by design, but is now updated to set the actual root scope object. Parser consequently now tracks the root_scope object.
Platform
Result of
lsb_release -a
:running on x86_64 vm
Result of
flatcc --version
:Error case:
When using empty namespace (
namespace ;
), error on attempting to compile nested struct/tables.Contents of
t.fbs
, which was the output offlatc --proto
:output of
./flatcc -a t.fbs
:No files generated.
With the exact same input
.fbs
file,flatc
successfully compiles whereflatcc
does not.Replicated with replacement of tables with structs (all combinations), though the error does correctly identify when
u
is a struct rather than a table.Does not give this error on removing the namespace declaration altogether, does not give this error when a non-empty namespace is given.