This error happens when FIDL expects a declaration and finds something else. This is often caused by a typo. The valid declarations are: type
, alias
, const
, using
, protocol
, and service
.
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0006.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
To fix this error, check for typos in your top-level declarations and ensure you're only using features that are supported by FIDL.
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0006.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}