Skip to content

Commit ff57b76

Browse files
committed
SI-7839 Final val breaks checkinit build
Scalac does not care to initialize the unused field it emits for a `final val`. Users of the accessor method, which supplies the constant definition inline, will find that -Xcheckinit will throw. Therefore, we don't use `final` for the `val phaseName`.
1 parent 33a819f commit ff57b76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/scala/tools/nsc/Global.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
629629
object terminal extends {
630630
val global: Global.this.type = Global.this
631631
} with SubComponent {
632-
final val phaseName = "terminal"
632+
val phaseName = "terminal"
633633
val runsAfter = List("jvm")
634634
val runsRightAfter = None
635635
override val terminal = true

0 commit comments

Comments
 (0)