mirror of https://github.com/golang/go.git
This CL teaches lsp to report `**T` instead of `**invalid type`, `func (badParam) badResult` instead of `func (invalid type) invalid type`, etc. To do that, we need to detect "invalid type" inside any part of a type. I've added typeIsValid() function for that. To simplify type formating code in resolveInvalid(), formatNode function is added that can also format *ast.StarExpr (of any depth). Since we already used AST printer in the same file, I added formatNode function that is now used in both places. While at it, replaced bytes.Buffer to strings.Builder there. Change-Id: I3bb84c58c417b175cceefb410e238c48425f7cee Reviewed-on: https://go-review.googlesource.com/c/tools/+/210357 Run-TryBot: Iskander Sharipov <quasilyte@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
|---|---|---|
| .. | ||
| comment.go | ||
| comment_test.go | ||
| completion.go | ||
| completion_format.go | ||
| completion_keywords.go | ||
| completion_labels.go | ||
| completion_literal.go | ||
| completion_snippet.go | ||
| deep_completion.go | ||
| diagnostics.go | ||
| errors.go | ||
| folding_range.go | ||
| format.go | ||
| highlight.go | ||
| hover.go | ||
| identifier.go | ||
| implementation.go | ||
| options.go | ||
| references.go | ||
| rename.go | ||
| rename_check.go | ||
| signature_help.go | ||
| source_test.go | ||
| suggested_fix.go | ||
| symbols.go | ||
| tidy.go | ||
| util.go | ||
| view.go | ||