Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: confusing errors when forgetting an import for an anonymous field #27938
What version of Go are you using (
FWIW, go/types reports: "undeclared name: sync" which seems clearer.
@hellozee Not sure if this is a great "starter issue" in the compiler as it seems pretty central to how name lookup works - but I'm just guessing; haven't looked into this yet. But basically 1) you'd have to find which part of the code reports "sync is not a package" and why it's not complaining about sync not being defined instead. And 2) mark the respective node with Broke or SetDiag so that we don't get a 2nd error.