mirror of https://github.com/golang/go.git
If A is a type, then in
type B {
A
} it is a type, but in
type C {
A int
}
it is a variable (and similarly in function types). The old code got this wrong.
Fixes: golang/go#46068
Change-Id: Ib7320914de81d2b7377214f53f99f4fea25e00fb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/318749
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Peter Weinberger <pjw@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
|
||
|---|---|---|
| .. | ||
| README.md | ||
| a.go | ||
| a.go.golden | ||
| b.go | ||
| b.go.golden | ||
| semantic_test.go | ||
README.md
The golden files are the output of gopls semtok <src-file>, with -- semantic --
inserted as the first line (the spaces are mandatory) and an extra newline at the end.