Skip to content

Commit 6e46b18

Browse files
authored
Merge pull request #131 from lenguyenthanh/fix-deprecated-ykind-projector
Fix deprecated ykind projector in scala 3.5
2 parents 88f9a12 + 1aedf63 commit 6e46b18

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/src/main/scala/org/typelevel/scalacoptions/ScalaVersion.scala

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ object ScalaVersion {
4545
val V3_3_1 = ScalaVersion(3, 3, 1)
4646
val V3_3_3 = ScalaVersion(3, 3, 3)
4747
val V3_4_0 = ScalaVersion(3, 4, 0)
48+
val V3_5_0 = ScalaVersion(3, 5, 0)
4849

4950
private val versionRegex = raw"""(\d+)\.(\d+)\.(\d+)(?:-.*)?""".r
5051
def fromString(version: String): Either[IllegalArgumentException, ScalaVersion] =

lib/src/main/scala/org/typelevel/scalacoptions/ScalacOptions.scala

+6-2
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ private[scalacoptions] trait ScalacOptions {
440440
/** Advanced options (-X)
441441
*/
442442
val advancedOptions: Set[ScalacOption] = ListSet(
443-
lint
443+
lint,
444+
advancedKindProjector
444445
) ++ lintOptions
445446

446447
/** Private options (-Y)
@@ -468,7 +469,10 @@ private[scalacoptions] trait ScalacOptions {
468469
* syntax.
469470
*/
470471
val privateKindProjector =
471-
privateOption("kind-projector", version => version >= V3_0_0)
472+
privateOption("kind-projector", version => version.isBetween(V3_0_0, V3_5_0))
473+
474+
val advancedKindProjector =
475+
advancedOption("kind-projector", version => version >= V3_5_0)
472476

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

0 commit comments

Comments
 (0)