You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report. The ListExpr node was added to hold expression lists in type instantiation, and it's the first time a new node type has been added in at least 10 years. I'm working on writing up a proper proposal for the changes to go/ast, and this type of panic is one of our primary concerns, though it may be unavoidable.
Use the typeparams helper package to fix AST rewriting in go/ast/astutil
when encountering the new ListExpr type.
This is liable to break in the future when the go/ast API changes, but
at least it will be easy to find by virtue of using internal/typeparams.
Fixesgolang/vscode-go#1551
Change-Id: Id34bbcdede9024ed9818bef6d73a19e993dd76a8
Reviewed-on: https://go-review.googlesource.com/c/tools/+/326131
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Using Go's
dev.typeparams
branch andgopls
built with-tags=typeparams -gcflags=all=-G=3
, it works fairly well, but it randomly crashes with this:I didn't dig much deeper into it but I figured I should open a bug report here to keep track.
I'll try to create a minimal repro and share it once I figure out how to trigger it.
The text was updated successfully, but these errors were encountered: