mirror of
https://github.com/golang/go.git
synced 2024-09-29 06:17:11 +00:00
spec: cyclic imports are illegal
Fixes #4976. R=r CC=golang-dev https://golang.org/cl/7421050
This commit is contained in:
parent
a969f3c247
commit
4be38dde84
@ -1,6 +1,6 @@
|
||||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Version of March 1, 2013",
|
||||
"Subtitle": "Version of March 4, 2013",
|
||||
"Path": "/ref/spec"
|
||||
}-->
|
||||
|
||||
@ -5367,7 +5367,8 @@ import . "lib/math" Sin
|
||||
<p>
|
||||
An import declaration declares a dependency relation between
|
||||
the importing and imported package.
|
||||
It is illegal for a package to import itself or to import a package without
|
||||
It is illegal for a package to import itself, directly or indirectly,
|
||||
or to directly import a package without
|
||||
referring to any of its exported identifiers. To import a package solely for
|
||||
its side-effects (initialization), use the <a href="#Blank_identifier">blank</a>
|
||||
identifier as explicit package name:
|
||||
|
Loading…
Reference in New Issue
Block a user