| ## fi-0181: Library attribute argument references constant {:#fi-0181} |
| |
| Attribute arguments on library declarations are not allowed to reference |
| constants: |
| |
| {% include "docs/reference/fidl/language/error-catalog/label/_bad.md" %} |
| |
| ```fidl |
| {% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0181.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %} |
| ``` |
| |
| Instead, provide a literal argument: |
| |
| {% include "docs/reference/fidl/language/error-catalog/label/_good.md" %} |
| |
| ```fidl |
| {% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0181.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %} |
| ``` |
| |
| This restriction exists because it is rarely needed and supporting it adds |
| unwarranted complexity to the compiler. |