You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When bootstrapping the compiler with the `-Ysafe-init` flag, we would
get the following errors:
```
[error] -- Error: /Users/********/dotty/compiler/src/dotty/tools/dotc/core/Phases.scala:164:19
[error] 164 | p.init(this, miniPhases.head.id, miniPhases.last.id)
[error] | ^^^^
[error] |Cannot prove that the value is fully initialized. Only initialized values may be used as arguments. Calling trace:
[error] | -> usePhases(List(SomePhase)) [ Contexts.scala:876 ]
[error] -- Error: /Users/********/dotty/compiler/src/dotty/tools/dotc/core/Phases.scala:161:30
[error] 161 | miniPhases.foreach{ phase =>
[error] | ^
[error] |Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
[error] | Calling trace:
[error] | -> usePhases(List(SomePhase)) [ Contexts.scala:876 ]
[error] |
[error] |The unsafe promotion may cause the following problem:
[error] |Cannot prove that the value is fully initialized. Only initialized values may be used as arguments. Calling trace:
[error] | -> usePhases(List(SomePhase)) [ Contexts.scala:876 ]
[error] 162 | checkRequirements(phase)
[error] 163 | phase.init(this, nextPhaseId)}
[error] -- Error: /Users/********/dotty/compiler/src/dotty/tools/dotc/core/Phases.scala:166:23
[error] 166 | phase.init(this, nextPhaseId)
[error] | ^^^^
[error] |Cannot prove that the value is fully initialized. Only initialized values may be used as arguments. Calling trace:
[error] | -> usePhases(List(SomePhase)) [ Contexts.scala:876 ]
```
This fixes the initialization order to address these errors.
Review by @liufengyun
0 commit comments