Debian Codegraph @

quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-call.go.golden

raw
1 -- Remove embedded field "FunctionCallInner" from selector --
2 package pkg
3
4 type FunctionCallOuter struct{ FunctionCallInner }
5 type FunctionCallInner struct {
6 F8 func() FunctionCallContinuedOuter
7 }
8 type FunctionCallContinuedOuter struct{ FunctionCallContinuedInner }
9 type FunctionCallContinuedInner struct{ F9 int }
10
11 func fnCall() {
12 var call FunctionCallOuter
13 _ = call.F8().FunctionCallContinuedInner.F9 //@ diag(`could remove embedded field "FunctionCallInner" from selector`), diag(`could remove embedded field "FunctionCallContinuedInner" from selector`)
14 _ = call.F8().F9 // minimal form
15 }
16
17 -- Remove embedded field "FunctionCallContinuedInner" from selector --
18 package pkg
19
20 type FunctionCallOuter struct{ FunctionCallInner }
21 type FunctionCallInner struct {
22 F8 func() FunctionCallContinuedOuter
23 }
24 type FunctionCallContinuedOuter struct{ FunctionCallContinuedInner }
25 type FunctionCallContinuedInner struct{ F9 int }
26
27 func fnCall() {
28 var call FunctionCallOuter
29 _ = call.FunctionCallInner.F8().F9 //@ diag(`could remove embedded field "FunctionCallInner" from selector`), diag(`could remove embedded field "FunctionCallContinuedInner" from selector`)
30 _ = call.F8().F9 // minimal form
31 }