1
0
mirror of https://github.com/golang/go synced 2024-11-19 03:44:40 -07:00
go/internal/lsp/testdata/baz/baz.go.in
Rebecca Stambler 3832e276fb internal/lsp: implement type definitions
Extend definition tests to add typdef test.

Change-Id: Ibad988ae68f91d18f2c6b4739d758a536172fb35
Reviewed-on: https://go-review.googlesource.com/c/152239
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2018-12-04 18:51:09 +00:00

31 lines
611 B
Go

// +build go1.11
package baz
import (
"golang.org/x/tools/internal/lsp/bar"
f "golang.org/x/tools/internal/lsp/foo"
)
func Baz() {
defer bar.Bar() //@complete("B", Bar)
// TODO(rstambler): Test completion here.
defer bar.B
var x f.IntFoo //@complete("n", IntFoo),typdef("x", IntFoo)
bar.Bar() //@complete("B", Bar)
}
func _() {
bob := f.StructFoo{Value: 5}
if x := bob. //@complete(re"$", Value)
switch true == false {
case true:
if x := bob. //@complete(re"$", Value)
case false:
}
if x := bob.Va //@complete("a", Value)
switch true == true {
default:
}
}