Procházet zdrojové kódy

Explicitly disallow self-imports by libraries (#794)

Jon Meow před 4 roky
rodič
revize
eb61412c79
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  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";
 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
 #### Imports from the current package
 
 
 Entities defined in the current file may be used without mentioning the package
 Entities defined in the current file may be used without mentioning the package