-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: panic in go/types #45434
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
Comments
Thanks for the report, this is interesting. I would not be surprised if this has been fixed, but also that code should not panic. If I understand your description, you were doing something like this:
Is that correct? CC @griesemer |
The specific code pattern: type foo *foo.Bar doesn't cause a panic (neither in package p
import "fmt"
type fmt *fmt.Stringer for good measure, and we also get the expected error repors. We'd need more info to reproduce this crash, I think. |
Hi, package main
func main() {}
type fmt *fmt.Stringer What more info can I provide to help? |
Whatever the bug was in the type checkers, this is not reproducible at tip. |
Thanks for confirming that, @griesemer. |
gopls version: v0.6.9
gopls flags:
update flags: proxy
extension version: 0.24.0
go version: 1.16.3
environment: Visual Studio Code darwin
initialization error: undefined
manual restart count: 0
total start count: 1
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
It seems I was defining a type as pointer to an imported type but the type name was the same as the imported package.
The text was updated successfully, but these errors were encountered: