Преглед изворни кода

Explicitly disallow self-imports by libraries (#794)

Jon Meow пре 4 година
родитељ
комит
eb61412c79
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      docs/design/code_and_name_organization/README.md

+ 3 - 0
docs/design/code_and_name_organization/README.md

@@ -469,6 +469,9 @@ import Math;
 import Math library "Trigonometry";
 ```
 
+NOTE: A library must never import itself. Any `impl` files in a library
+automatically import the `api`, so a self-import should never be required.
+
 #### Imports from the current package
 
 Entities defined in the current file may be used without mentioning the package