Przeglądaj źródła

Explicitly disallow self-imports by libraries (#794)

Jon Meow 4 lat temu
rodzic
commit
eb61412c79
1 zmienionych plików z 3 dodań i 0 usunięć
  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