Commit feff062
committed
Refactor c_typecheck_baset::do_initializer
This function had (almost) the same code across several branches. The
refactoring reduces the number of lines of code and removes an "assert"
statement: `make_constant` will report an error if the result isn't a
constant, making this assertion unnecessary.1 parent 8562df3 commit feff062
1 file changed
+14
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 235 | + | |
| 236 | + | |
241 | 237 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 238 | + | |
250 | 239 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 240 | + | |
| 241 | + | |
264 | 242 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
270 | 249 | | |
271 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
272 | 254 | | |
273 | 255 | | |
274 | 256 | | |
| |||
0 commit comments