Specify errors about wrong import augment
/import
structures
#3676
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on the response in #3646, this PR specifies a compile-time error which occurs if a main library L which is being augmented along with all augmentation libraries A1 .. Ak reachable from L via one or more
import augment
links forms a graph that has a cycle.This PR also makes it an error for a
<uri>
in animport augment
directive to denote a regular library, it must be an augmentation library. This change is also based on #3646.Finally, this PR makes it an error for a
<uri>
in a regularimport
directive (notimport augment
) to denote an entity which is not a library (including: it's an error if it is an augmentation library).