Commit ba15593
committed
fix(core): Func<void> and Converter<T, void> are ill-formed (#2299, SR-AUD-126)
Func<void> compiled, and it was THE SAME TYPE as Action -- not convertible to
it, the same type, because an alias template introduces no new type.
Converter<T, void> collapsed onto ActionT<T> the same way. .NET cannot express
any of this: void is not a permitted C# generic argument.
Landed under SA-8 rather than SA-10: nothing here changes a signature, the port
was simply MORE PERMISSIVE than .NET, which is exactly SA-8's direction.
All 17 Func/FuncT* aliases and BOTH Converter declarations are constrained. Both
mattered: System/Converter.hpp and System/Action.hpp declare it identically, and
a repair touching one would have left the other accepting void.
THE FINDING'S SECOND PRESCRIPTION IS STRUCTURALLY IMPOSSIBLE AND IS NOT
ATTEMPTED, which the review had already established and which is now recorded as
a declaration rather than left as a gap: with alias templates there is only ONE
type, so no declaration can accept an Action and reject a Func-shaped callable.
Constraining removes the SPELLING; it cannot create a CATEGORY. Preserving the
category would mean replacing every alias with a distinct class type -- a
whole-API break this repository has not asked for.
A DETECTION-IDIOM DETAIL WORTH KEEPING, measured while writing the fixture:
testing for the absence of a constrained alias must be written over a DEPENDENT
parameter. gcc evaluates a constrained alias eagerly in a non-dependent
'requires', so the direct spelling is a HARD ERROR rather than a false value --
and in the fixture it leaked a diagnostic outside its own site region, making
every verdict in that file untrustworthy until it was rewritten.
Fixture set: 32 fixtures / 184 sites. Gate 17,283 run, 0 failed. Module graph
unchanged at 41/92.1 parent 14f964b commit ba15593
9 files changed
Lines changed: 269 additions & 21 deletions
File tree
- audit
- docs
- modules/core
- include/System
- tests/System
- test/consumer
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
188 | | - | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
21 | 35 | | |
22 | 36 | | |
23 | 37 | | |
| |||
44 | 58 | | |
45 | 59 | | |
46 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
47 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
48 | 72 | | |
49 | 73 | | |
50 | 74 | | |
51 | 75 | | |
52 | 76 | | |
53 | 77 | | |
54 | 78 | | |
55 | | - | |
| 79 | + | |
56 | 80 | | |
57 | 81 | | |
58 | 82 | | |
59 | 83 | | |
60 | 84 | | |
61 | 85 | | |
62 | 86 | | |
63 | | - | |
| 87 | + | |
64 | 88 | | |
65 | 89 | | |
66 | 90 | | |
67 | 91 | | |
68 | 92 | | |
69 | 93 | | |
70 | 94 | | |
71 | | - | |
| 95 | + | |
72 | 96 | | |
73 | 97 | | |
74 | 98 | | |
75 | 99 | | |
76 | 100 | | |
77 | 101 | | |
78 | 102 | | |
79 | | - | |
| 103 | + | |
80 | 104 | | |
81 | 105 | | |
82 | 106 | | |
83 | 107 | | |
84 | 108 | | |
85 | 109 | | |
86 | 110 | | |
87 | | - | |
| 111 | + | |
88 | 112 | | |
89 | 113 | | |
90 | 114 | | |
| |||
93 | 117 | | |
94 | 118 | | |
95 | 119 | | |
96 | | - | |
| 120 | + | |
97 | 121 | | |
98 | 122 | | |
99 | 123 | | |
| |||
102 | 126 | | |
103 | 127 | | |
104 | 128 | | |
105 | | - | |
| 129 | + | |
106 | 130 | | |
107 | 131 | | |
108 | 132 | | |
| |||
111 | 135 | | |
112 | 136 | | |
113 | 137 | | |
114 | | - | |
| 138 | + | |
115 | 139 | | |
116 | 140 | | |
117 | 141 | | |
| |||
120 | 144 | | |
121 | 145 | | |
122 | 146 | | |
123 | | - | |
| 147 | + | |
124 | 148 | | |
125 | 149 | | |
126 | 150 | | |
| |||
129 | 153 | | |
130 | 154 | | |
131 | 155 | | |
132 | | - | |
| 156 | + | |
133 | 157 | | |
134 | 158 | | |
135 | 159 | | |
| |||
138 | 162 | | |
139 | 163 | | |
140 | 164 | | |
141 | | - | |
| 165 | + | |
142 | 166 | | |
143 | 167 | | |
144 | 168 | | |
| |||
148 | 172 | | |
149 | 173 | | |
150 | 174 | | |
151 | | - | |
| 175 | + | |
152 | 176 | | |
153 | 177 | | |
154 | 178 | | |
| |||
158 | 182 | | |
159 | 183 | | |
160 | 184 | | |
161 | | - | |
| 185 | + | |
162 | 186 | | |
163 | 187 | | |
164 | 188 | | |
| |||
168 | 192 | | |
169 | 193 | | |
170 | 194 | | |
171 | | - | |
| 195 | + | |
172 | 196 | | |
173 | 197 | | |
174 | 198 | | |
| |||
179 | 203 | | |
180 | 204 | | |
181 | 205 | | |
182 | | - | |
| 206 | + | |
183 | 207 | | |
184 | 208 | | |
185 | 209 | | |
| |||
190 | 214 | | |
191 | 215 | | |
192 | 216 | | |
193 | | - | |
| 217 | + | |
194 | 218 | | |
195 | 219 | | |
196 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
Binary file not shown.
0 commit comments