Explorar o código

Explicitly disallow self-imports by libraries (#794)

Jon Meow %!s(int64=4) %!d(string=hai) anos
pai
achega
eb61412c79
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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