From f1683acb6f22368e712355f755d97c8b179de20f Mon Sep 17 00:00:00 2001 From: Joan Goyeau Date: Tue, 31 Oct 2023 17:46:23 -0400 Subject: [PATCH] Add -Ysafe-init option --- .../scala/org/typelevel/scalacoptions/ScalacOptions.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/main/scala/org/typelevel/scalacoptions/ScalacOptions.scala b/lib/src/main/scala/org/typelevel/scalacoptions/ScalacOptions.scala index 35bf29d..cb5b143 100644 --- a/lib/src/main/scala/org/typelevel/scalacoptions/ScalacOptions.scala +++ b/lib/src/main/scala/org/typelevel/scalacoptions/ScalacOptions.scala @@ -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