This error occurs when a fields in a union or table is missing an ordinal.
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0016-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0016-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
To fix this error, explicitly specify the ordinals for the table or union:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0016.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
Unlike structs, tables and unions are designed to allow backwards-compatible changes to be made to their contents. In order to enable this, a consistent value, the ordinal, is needed to identify table fields or union variants. To avoid confusion and make it harder to accidentally change ordinals when changing a table or union, ordinals must always be specified explicitly.