Commit f17e4d5
committed
Fix safe-init error in MegaPhase
When bootstrapping the compiler with the `-Ysafe-init` flag, we would
get the following error:
```
[error] -- Error: /Users/rrampersad/Documents/school/URA/dotty/compiler/src/dotty/tools/dotc/transform/MegaPhase.scala:458:7
[error] 458 | for ((phase, idx) <- miniPhases.zipWithIndex) {
[error] | ^
[error] |Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
[error] |
[error] |The unsafe promotion may cause the following problem:
[error] |Cannot prove that the value is fully initialized. May only assign fully initialized value.
[error] 459 | phase.superPhase = this
[error] 460 | phase.idxInGroup = idx
[error] 461 | }
```
This fixes the initialization order to address this error.1 parent b472e26 commit f17e4d5
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | 458 | | |
464 | 459 | | |
465 | 460 | | |
| |||
564 | 559 | | |
565 | 560 | | |
566 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| |||
0 commit comments