cmd/compile: poor error for constant using missing import #26818
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Playground.
Does this issue reproduce with the latest release?
I haven't checked, but the playground says it is running Go 1.10.3.
What did you do?
https://play.golang.org/p/KDfoNw1JzXb
What did you expect to see?
One error, pointing out that I didn't import
"time"
.What did you see instead?
Two errors, one of which is misleading:
The first error is outright wrong if the
"time"
package was imported, yet it was printed, and worse, it came first. The only useful error there is the second message.The text was updated successfully, but these errors were encountered: