blob: eb2febdb6a3ef7379546727ca792f98a049e7213 [file] [log] [blame]
-- inlayHint --
package inlayHint //@inlayHint("package")
import "fmt"
func fieldNames() {
for _< int>, c< struct{in string; want string}> := range []struct {
in, want string
}{
struct{ in, want string }{<in: >"Hello, world", <want: >"dlrow ,olleH"},
<struct{in string; want string}>{<in: >"Hello, 世界", <want: >"界世 ,olleH"},
<struct{in string; want string}>{<in: >"", <want: >""},
} {
fmt.Println(<a...: >c.in == c.want)
}
}
func fieldNamesPointers() {
for _< int>, c< *struct{in string; want string}> := range []*struct {
in, want string
}{
&struct{ in, want string }{<in: >"Hello, world", <want: >"dlrow ,olleH"},
<&struct{in string; want string}>{<in: >"Hello, 世界", <want: >"界世 ,olleH"},
<&struct{in string; want string}>{<in: >"", <want: >""},
} {
fmt.Println(<a...: >c.in == c.want)
}
}