-
Notifications
You must be signed in to change notification settings - Fork 17.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go/types, types2: type checker accepts import of package called "init" #43962
Labels
Milestone
Comments
Change https://golang.org/cl/287494 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Jan 28, 2021
…ge called "init" Updates #43962. Change-Id: I070153c55baec62d13ca9284f02781b8c1276844 Reviewed-on: https://go-review.googlesource.com/c/go/+/287494 Trust: Robert Griesemer <[email protected]> Run-TryBot: Robert Griesemer <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Findley <[email protected]>
The above CL was ported to dev.regabi in https://golang.org/cl/290570 (forgot to tag this issue). I think we can close this once dev.regabi becomes master. |
With the merge of |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Given two packages (for convenience represented via single files both stored in the same directory):
a.go
:package init
b.go
:package b; import "./a"
the compiler reports "cannot import package as init - init must be a func", but the
go/types
andtypes2
accept this (though they correctly don't accept a local rename toinit
).cc: @findleyr
The text was updated successfully, but these errors were encountered: