| ## fi-0133: Attribute argument must be literal {:#fi-0133} |
| |
| Certain [official attributes](/docs/reference/fidl/language/attributes.md) do |
| not allow arguments that are references to 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-0133.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %} |
| ``` |
| |
| Instead, pass a literal value as the 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-0133.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %} |
| ``` |
| |
| These attributes require a literal argument because their values influence |
| compilation. Supporting non-literal arguments would be difficult to implement, |
| or in some cases impossible because it leads to contradictions. |