Skip to content

Commit

Permalink
Merge pull request #719 from armanbilge/feature/stable-kind-projector
Browse files Browse the repository at this point in the history
Use stable option for kind-projector in 3.5+
  • Loading branch information
armanbilge authored Jul 15, 2024
2 parents 04886b3 + 70eabd1 commit 775bcd2
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 775bcd2

Please sign in to comment.