This error occurs when you try to use the @available
attribute's platform
argument anywhere other than above a library declaration. The platform
argument is only valid at the library
level.
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0149.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
To fix this, either move the platform
argument to the library @available
attribute:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0149-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
or remove the platform
argument completely:
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0149-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}