| 1 |
This test checks completion related to field lists. |
| 2 |
|
| 3 |
-- flags -- |
| 4 |
-ignore_extra_diags |
| 5 |
|
| 6 |
-- settings.json -- |
| 7 |
{ |
| 8 |
"completeUnimported": false |
| 9 |
} |
| 10 |
|
| 11 |
-- field_list.go -- |
| 12 |
package fieldlist |
| 13 |
|
| 14 |
var myInt int //@item(flVar, "myInt", "int", "var") |
| 15 |
type myType int //@item(flType, "myType", "int", "type") |
| 16 |
|
| 17 |
func (my) _() {} //@complete(re"()\\) _", flType) |
| 18 |
func (my my) _() {} //@complete(re"() my\\)"),complete(re"()\\) _", flType) |
| 19 |
|
| 20 |
func (myType) _() {} //@complete(re"()\\) {", flType) |
| 21 |
|
| 22 |
func (myType) _(my my) {} //@complete(re"() my\\)"),complete(re"()\\) {", flType) |
| 23 |
|
| 24 |
func (myType) _() my {} //@complete(re"() {", flType) |
| 25 |
|
| 26 |
func (myType) _() (my my) {} //@complete(re"() my"),complete(re"()\\) {", flType) |
| 27 |
|
| 28 |
func _() { |
| 29 |
var _ struct { |
| 30 |
//@complete("", flType) |
| 31 |
m my //@complete(re"() my"),complete(re"() \\/\\/", flType) |
| 32 |
} |
| 33 |
|
| 34 |
var _ interface { |
| 35 |
//@complete("", flType) |
| 36 |
m() my //@complete(re"()\\("),complete(re"() \\/\\/", flType) |
| 37 |
} |
| 38 |
} |