Skip to content
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, cmd/compile/internal/types2: avoid "declared but not used" errors for variables in invalid declarations #42937

Closed
griesemer opened this issue Dec 2, 2020 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@griesemer
Copy link
Contributor

griesemer commented Dec 2, 2020

Reminder/follow-up issue.

Some of these error have been addressed with 274615 in the dev.typeparams branch (types2 package only, so far), but not all. Should look into solving this more consistently.

For some test cases which could be shorter (no need for _ = ... statements), see:

test/fixedbugs/bug062.go
test/fixedbugs/bug131.go
test/fixedbugs/bug175.go
test/fixedbugs/bug289.go
test/interface/pointer.go

There are likely many more.

cc: @findleyr

@griesemer griesemer added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 2, 2020
@griesemer griesemer added this to the Go1.17 milestone Dec 2, 2020
@griesemer griesemer self-assigned this Dec 2, 2020
@griesemer griesemer changed the title go/types: avoid "declared but not used" errors for variables in invalid declarations go/types, cmd/compile/internal/types2: avoid "declared but not used" errors for variables in invalid declarations Dec 2, 2020
@griesemer griesemer modified the milestones: Go1.17, Go1.18 Apr 28, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/351730 mentions this issue: cmd/compile/internal/types2: avoid "declared but not used" errors for invalid code

@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants