Skip to content

Commit

Permalink
Use stable option for kind-projector in 3.5+
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Jul 15, 2024
1 parent 06669ca commit 70eabd1
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,12 @@ object TypelevelSettingsPlugin extends AutoPlugin {
},
scalacOptions ++= {
scalaVersion.value match {
case V(V(3, _, _, _)) if onlyScala3.value =>
Seq("-Ykind-projector:underscores")

case V(V(3, _, _, _)) =>
Seq("-language:implicitConversions", "-Ykind-projector")
case V(V(3, minor, _, _)) =>
val kpFlag = if (minor >= 5) "-Xkind-projector" else "-Ykind-projector"
if (onlyScala3.value)
Seq(s"$kpFlag:underscores")
else
Seq("-language:implicitConversions", kpFlag)

case V(V(2, minor, _, _)) if minor >= 12 =>
Seq("-language:_", "-Xsource:3")
Expand Down

0 comments on commit 70eabd1

Please sign in to comment.