docs← Back to article

Markdown for LLMs

LDC-E1103 — The same package imported twice

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E1103 — The same package imported twice

## What it means

Each dependency is declared exactly once per package: one import line
brings the whole package into view, and a second line naming the same
package adds nothing. When the same package name appears on two import
lines, the compiler stops at the repetition.

The repair is deletion: keep one of the two lines and remove the other.
Which one to keep never matters, since both name the same dependency.

## Example

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
import demo.other version "0.1.0";
import demo.other version "0.1.0";

entity Applicant;
```

## Fix

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
import demo.other version "0.1.0";

entity Applicant;
```

## Engine message

The engine reports this in its own wording:

```text
example.law:5:1: error LDC-E1103: repeated import of package "demo.other" (§23: an import is declared once per package)
```

## Related

- [LDC-E1102](/diagnostics/LDC-E1102/) — importing the own package is rejected too.
- [Vocabulary](/constructs/vocabulary/) — how names are declared and which positions take them.