@@ -37,16 +37,33 @@ func main() {
37
37
gs1 := GenericStruct1 [string ]{"" }
38
38
sink (gs1 .Identity (source ())) // $ hasValueFlow="call to Identity"
39
39
}
40
+ {
41
+ gs1 := GenericStruct1 [string ]{"" }
42
+ f := gs1 .Identity
43
+ sink (f (source ())) // $ hasValueFlow="call to f"
44
+ }
40
45
{
41
46
gs1 := GenericStruct1 [string ]{"" }
42
47
gs1 .Field = source ()
43
48
sink (gs1 .Getter ()) // $ hasValueFlow="call to Getter"
44
49
}
50
+ {
51
+ gs1 := GenericStruct1 [string ]{"" }
52
+ gs1 .Field = source ()
53
+ f := gs1 .Getter
54
+ sink (f ()) // $ MISSING: hasValueFlow="call to f"
55
+ }
45
56
{
46
57
gs1 := GenericStruct1 [string ]{"" }
47
58
gs1 .Setter (source ())
48
59
sink (gs1 .Field ) // $ hasValueFlow="selection of Field"
49
60
}
61
+ {
62
+ gs1 := GenericStruct1 [string ]{"" }
63
+ f := gs1 .Setter
64
+ f (source ())
65
+ sink (gs1 .Field ) // $ MISSING: hasValueFlow="selection of Field"
66
+ }
50
67
51
68
{
52
69
gs2 := GenericStruct2 [string , string ]{source (), "" }
@@ -56,16 +73,33 @@ func main() {
56
73
gs2 := GenericStruct2 [string , string ]{"" , "" }
57
74
sink (gs2 .Identity1 (source ())) // $ hasValueFlow="call to Identity1"
58
75
}
76
+ {
77
+ gs2 := GenericStruct2 [string , string ]{"" , "" }
78
+ f := gs2 .Identity1
79
+ sink (f (source ())) // $ hasValueFlow="call to f"
80
+ }
59
81
{
60
82
gs2 := GenericStruct2 [string , string ]{"" , "" }
61
83
gs2 .Field1 = source ()
62
84
sink (gs2 .Getter1 ()) // $ hasValueFlow="call to Getter1"
63
85
}
86
+ {
87
+ gs2 := GenericStruct2 [string , string ]{"" , "" }
88
+ gs2 .Field1 = source ()
89
+ f := gs2 .Getter1
90
+ sink (f ()) // $ MISSING: hasValueFlow="call to f"
91
+ }
64
92
{
65
93
gs2 := GenericStruct2 [string , string ]{"" , "" }
66
94
gs2 .Setter1 (source ())
67
95
sink (gs2 .Field1 ) // $ hasValueFlow="selection of Field1"
68
96
}
97
+ {
98
+ gs2 := GenericStruct2 [string , string ]{"" , "" }
99
+ f := gs2 .Setter1
100
+ f (source ())
101
+ sink (gs2 .Field1 ) // $ MISSING: hasValueFlow="selection of Field1"
102
+ }
69
103
70
104
{
71
105
gs2 := GenericStruct2 [string , string ]{"" , source ()}
@@ -75,14 +109,31 @@ func main() {
75
109
gs2 := GenericStruct2 [string , string ]{"" , "" }
76
110
sink (gs2 .Identity2 (source ())) // $ hasValueFlow="call to Identity2"
77
111
}
112
+ {
113
+ gs2 := GenericStruct2 [string , string ]{"" , "" }
114
+ f := gs2 .Identity2
115
+ sink (f (source ())) // $ hasValueFlow="call to f"
116
+ }
78
117
{
79
118
gs2 := GenericStruct2 [string , string ]{"" , "" }
80
119
gs2 .Field2 = source ()
81
120
sink (gs2 .Getter2 ()) // $ hasValueFlow="call to Getter2"
82
121
}
122
+ {
123
+ gs2 := GenericStruct2 [string , string ]{"" , "" }
124
+ gs2 .Field2 = source ()
125
+ f := gs2 .Getter2
126
+ sink (f ()) // $ MISSING: hasValueFlow="call to f"
127
+ }
83
128
{
84
129
gs2 := GenericStruct2 [string , string ]{"" , "" }
85
130
gs2 .Setter2 (source ())
86
131
sink (gs2 .Field2 ) // $ hasValueFlow="selection of Field2"
87
132
}
133
+ {
134
+ gs2 := GenericStruct2 [string , string ]{"" , "" }
135
+ f := gs2 .Setter2
136
+ f (source ())
137
+ sink (gs2 .Field2 ) // $ MISSING: hasValueFlow="selection of Field2"
138
+ }
88
139
}
0 commit comments