Markdown for LLMs
duplicate-declaration-label
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# duplicate-declaration-label
Два объявления одного пакета несут дословно одну метку [§218](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/30-part-xxix-ux-dx-specification.ru.md#218-multilingual-ux) — кандидат в дубль определения.
## Query
```lawq
from a in labels
where exists(d in nodes
where (d.id == a.node
and d.kind in ["symbol_decl", "type_decl", "function_decl"]))
and exists(b in labels
where (b.text == a.text and b.lang == a.lang and b.package == a.package
and b.node != a.node
and exists(e in nodes
where (e.id == b.node
and e.kind in ["symbol_decl", "type_decl",
"function_decl"]))
and not exists(child in nodes
where (child.id == b.node
and starts_with(child.id, a.node)
and contains(child.id, "/value/")))
and not exists(parent in nodes
where (parent.id == a.node
and starts_with(parent.id, b.node)
and contains(parent.id, "/value/")))))
select a.node as node, a.text as label, anchor(a.node) as anchors
```