gopls/internal/test/marker/testdata/completion/cast.txt
raw| 1 | This test checks completion related to casts. |
| 2 | |
| 3 | -- flags -- |
| 4 | -ignore_extra_diags |
| 5 | |
| 6 | -- cast.go -- |
| 7 | package cast |
| 8 | |
| 9 | func _() { |
| 10 | foo := struct{x int}{x: 1} //@item(x_field, "x", "int", "field") |
| 11 | _ = float64(foo.x) //@complete(re"()x", x_field) |
| 12 | } |
| 13 | |
| 14 | func _() { |
| 15 | foo := struct{x int}{x: 1} |
| 16 | _ = float64(foo. //@complete(re"() \\/", x_field) |
| 17 | } |