blob: 63a3f13825a23543e6bf955efb4fbded6bd5e0e9 [file] [log] [blame]
Tests of reference to implicit type switch vars, which are
a special case in go/types.Info{Def,Use,Implicits}.
-- go.mod --
module example.com
go 1.12
-- a/a.go --
package a
func _(x interface{}) {
switch y := x.(type) { //@loc(yDecl, "y"), refs("y", yDecl, yInt, yDefault)
case int:
println(y) //@loc(yInt, "y"), refs("y", yDecl, yInt, yDefault)
default:
println(y) //@loc(yDefault, "y")
}
}