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: missing error for non-comparable switch expression in empty switch #45575

Closed
griesemer opened this issue Apr 14, 2021 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Apr 14, 2021

Missing go/types error for:

package p

func _() {
	var a struct{ _ func() }
	switch a {
	}
}

This has been fixed in types2. See #43200 for details.

@griesemer griesemer added this to the Go1.17 milestone Apr 14, 2021
@findleyr
Copy link
Contributor

@findleyr findleyr commented Apr 20, 2021

This was fixed in https://golang.org/cl/278813, which I just confirmed at tip with the example in this issue.

@griesemer where are you noticing the missing error?

Loading

@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Apr 20, 2021

Never mind - it turns out that I was running the test incorrectly for go/types.

Loading

@griesemer griesemer closed this Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants