Commit 10fc983
committed
Fix fragile transformation of fromProduct when using
UnrollDefinitions assumed that the body of `fromProduct` had a specific shape
which is no longer the case with the dependent case class support introduced in
the previous commit. This caused compiler crashes for
tests/run/unroll-multiple.scala and tests/run/unroll-caseclass-integration
This commit fixes this by directly generating the correct fromProduct in
SyntheticMembers. This should also prevent crashes in situations where code is
injected into existing trees like the code coverage support or external compiler
plugins.@unroll
1 parent 4aa59eb commit 10fc983
File tree
4 files changed
+61
-60
lines changed- compiler/src/dotty/tools/dotc
- core
- transform
4 files changed
+61
-60
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| 621 | + | |
621 | 622 | | |
622 | 623 | | |
623 | 624 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| 428 | + | |
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
| |||
Lines changed: 45 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
526 | 539 | | |
527 | 540 | | |
528 | 541 | | |
529 | 542 | | |
530 | 543 | | |
531 | | - | |
| 544 | + | |
532 | 545 | | |
| 546 | + | |
533 | 547 | | |
534 | 548 | | |
535 | 549 | | |
536 | 550 | | |
537 | 551 | | |
538 | | - | |
| 552 | + | |
539 | 553 | | |
540 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
541 | 566 | | |
542 | 567 | | |
543 | 568 | | |
| |||
550 | 575 | | |
551 | 576 | | |
552 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
553 | 582 | | |
554 | | - | |
555 | | - | |
556 | | - | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
557 | 595 | | |
558 | 596 | | |
559 | 597 | | |
560 | 598 | | |
561 | 599 | | |
562 | | - | |
| 600 | + | |
563 | 601 | | |
564 | 602 | | |
565 | 603 | | |
| |||
Lines changed: 14 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | 231 | | |
262 | 232 | | |
263 | 233 | | |
| |||
277 | 247 | | |
278 | 248 | | |
279 | 249 | | |
280 | | - | |
281 | | - | |
282 | 250 | | |
283 | 251 | | |
284 | 252 | | |
285 | | - | |
286 | 253 | | |
287 | 254 | | |
288 | 255 | | |
289 | 256 | | |
290 | 257 | | |
291 | 258 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
312 | 273 | | |
313 | 274 | | |
314 | 275 | | |
| |||
0 commit comments