Skip to content

Commit

Permalink
Add -Ysafe-init option
Browse files Browse the repository at this point in the history
  • Loading branch information
joan38 committed Oct 1, 2023
1 parent 4c9bbb2 commit 73a8829
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,12 @@ private[scalacoptions] trait ScalacOptions {
val privateKindProjector =
privateOption("kind-projector", version => version >= V3_0_0)

/** Enables safe initialization check.
* More info: [[https://docs.scala-lang.org/scala3/reference/other-new-features/safe-initialization.html]]
*/
val privateSafeInit =
privateOption("safe-init", version => version >= V3_0_0)

/** Enables support for higher order unification in type constructor inference.
*
* Initially provided as a compiler option in the 2.12.x series to fix the infamous
Expand All @@ -469,10 +475,7 @@ private[scalacoptions] trait ScalacOptions {
* Enabled by default in 2.13.0+ and no longer accepted by the compiler as an option.
*/
val privatePartialUnification =
privateOption(
"partial-unification",
version => version.isBetween(V2_11_11, V2_13_0)
)
privateOption("partial-unification", version => version.isBetween(V2_11_11, V2_13_0))

/** Configures the number of worker threads for the compiler backend.
*
Expand Down Expand Up @@ -647,6 +650,7 @@ private[scalacoptions] trait ScalacOptions {
val privateOptions: Set[ScalacOption] = ListSet(
privateNoAdaptedArgs,
privateKindProjector,
privateSafeInit,
privatePartialUnification
) ++ privateWarnOptions

Expand Down

0 comments on commit 73a8829

Please sign in to comment.