Skip to content

Commit

Permalink
Merge pull request #135 from lenguyenthanh/fix-tpolecat
Browse files Browse the repository at this point in the history
Fix order of initialization regression from #131
  • Loading branch information
lenguyenthanh authored Aug 16, 2024
2 parents 667098e + 428ce69 commit 4d19a7c
Show file tree
Hide file tree
Showing 2 changed files with 17 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
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,15 @@ class ScalacOptionSuite extends munit.ScalaCheckSuite {
)
}
}

property("ScalacOptions.default should not contain null") {
forAll(versionGen, versionGen, versionGen) {
(currentMaj: Long, currentMin: Long, currentPatch: Long) =>
val version = ScalaVersion(currentMaj, currentMin, currentPatch)
ScalacOptions.default.foreach { option =>
assert(option.isSupported(version) || true)
}
}
}

}

0 comments on commit 4d19a7c

Please sign in to comment.