Skip to content

Commit

Permalink
Fix initialization order issue
Browse files Browse the repository at this point in the history
When initialize `advancedOptions`, the value of `advancedKindProjector`
is still `null`. That is caused because `advancedOptions` is placed
before `advancedOptions`. This is to fix that issue.
  • Loading branch information
lenguyenthanh committed Aug 16, 2024
1 parent 9a7ad11 commit 428ce69
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ private[scalacoptions] trait ScalacOptions {
def maxInlines(limit: Int) =
advancedOption("max-inlines", List(limit.toString), version => version >= V3_0_0)

/** Enables support for a subset of [[https://github.com/typelevel/kind-projector kind-projector]]
* syntax.
*/
val advancedKindProjector =
advancedOption("kind-projector", version => version >= V3_5_0)

/** Enable recommended warnings.
*/
def lintOption(
Expand Down Expand Up @@ -476,9 +482,6 @@ private[scalacoptions] trait ScalacOptions {
val privateKindProjector =
privateOption("kind-projector", version => version.isBetween(V3_0_0, V3_5_0))

val advancedKindProjector =
advancedOption("kind-projector", version => version >= V3_5_0)

/** Enables safe initialization check. More info:
* [[https://docs.scala-lang.org/scala3/reference/other-new-features/safe-initialization.html]]
*/
Expand Down

0 comments on commit 428ce69

Please sign in to comment.