Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix order of initialization regression from #131 #135

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
}
}

}