Markdown for LLMs
LDC-E1351 — Automaton member name taken twice
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E1351 — Automaton member name taken twice
## What it means
States, transitions, and regions share one package-wide name table: a
case names a member by its bare name, so two members under one name
would resolve to neither. When two procedures declare the same member
name, the compiler stops at the second declaration and lists both
owners.
The repair is to differentiate: prefix the names per procedure, or
rename one side. Unique names resolve exactly as written.
## Example
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Tenant;
procedure A(t: Tenant) {
state Open initial;
state Closed terminal;
}
procedure B(t: Tenant) {
state Open initial;
state Shut terminal;
}
```
## Fix
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Tenant;
procedure A(t: Tenant) {
state Open initial;
state Closed terminal;
}
procedure B(t: Tenant) {
state Dawn initial;
state Shut terminal;
}
```
## Engine message
The engine reports this in its own wording:
```text
example.law:11:11: error LDC-E1351: automaton member name "Open" is declared 2 times (state `A/Open`, state `B/Open`) — a state, transition or region name is unique within a package (§160.2, errata E-0149): the program and the §168 case name a member by a bare name, and one name on two members would resolve to neither. The resolution is to differentiate names in the program itself (e.g. with a procedure prefix)
```
## Related
- [Procedures](/constructs/procedure/) — states, transitions, and how a procedure runs.
- [LDC-E1201](/diagnostics/LDC-E1201/) — the companion collision for declared names.