Commit 416ad03
[gopls-release-branch.0.17] gopls/internal/golang/completion: fix crash in instance conversion
The new inference logic assumed that a CallExpr surrounding an instance
was a function, but it could be a conversion, builtin, or invalid type.
Add the missing check.
Fixes golang/go#70889
Change-Id: I0b05a90cca671196cf5cfd8782b6863e17485cc1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/637635
Reviewed-by: Alan Donovan <[email protected]>
Auto-Submit: Robert Findley <[email protected]>
Commit-Queue: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
(cherry picked from commit 74dea82)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/6376751 parent 688577c commit 416ad03
File tree
2 files changed
+8
-3
lines changed- gopls/internal
- golang/completion
- test/marker/testdata/completion
2 files changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2690 | 2690 | | |
2691 | 2691 | | |
2692 | 2692 | | |
2693 | | - | |
| 2693 | + | |
2694 | 2694 | | |
2695 | 2695 | | |
2696 | 2696 | | |
| |||
2704 | 2704 | | |
2705 | 2705 | | |
2706 | 2706 | | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
2707 | 2711 | | |
2708 | | - | |
2709 | | - | |
| 2712 | + | |
2710 | 2713 | | |
2711 | 2714 | | |
2712 | 2715 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
0 commit comments