Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify errors about wrong import augment/import structures #3676

Merged
merged 4 commits into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions working/augmentation-libraries/feature-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ It is a compile-time error if:
* A library augmentation contains a normal `library` directive. They are not
self-contained libraries, only pieces of the augmented library.

* An `import augment` directive has a `<uri>` that denotes an entity which
is not a library augmentation. *For example, it can not be a library.*

* An `export` or `import` (not `import augment`) refers to an entity which
is not a library. *For example, it cannot be a library augmentation or
a part file.*

* There is a cycle in the graph whose edges are the `import augment`
directives of an augmented library and of any augmentation libraries which
are directly or indirectly reachable from there via said edges.

### Applying an augmentation

A library applies an augmentation to itself using a new import directive with
Expand Down Expand Up @@ -1027,6 +1038,12 @@ language and our tools.

## Changelog

## 1.17

* Introduce compile-time errors about wrong structures in the graph of
libraries and augmentation libraries formed by directives like `import`
and `import augment` (#3646).

## 1.16

* Update grammar rules and add support for augmented type declarations of
Expand Down
Loading