blob: 413188987631ac08ba7eafdcb2aef50823f8772b [file] [log] [blame] [view]
## fi-0034: Name collision {:#fi-0034}
Two declarations cannot have the same name:
{% 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-0034.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
```
Instead, give each declaration a unique name:
{% 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-0034-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
```
Alternatively, remove one of the declarations if it was added by mistake:
{% 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-0034-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
```
For more information on choosing names, see the
[FIDL style guide][fidl-style-naming].
[fidl-style-naming]: /docs/development/languages/fidl/guides/style.md#names