Skip to content

Commit

Permalink
Merge pull request #77 from BalmungSan/patch-1
Browse files Browse the repository at this point in the history
Add warnNonUnitStatement to Scala 3 (3.3.1)
  • Loading branch information
armanbilge authored Sep 15, 2023
2 parents 2fca33b + 8b81e77 commit f25b725
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ object ScalaVersion {
val V3_0_0 = ScalaVersion(3, 0, 0)
val V3_1_0 = ScalaVersion(3, 1, 0)
val V3_3_0 = ScalaVersion(3, 3, 0)
val V3_3_1 = ScalaVersion(3, 3, 1)

implicit val scalaVersionOrdering: Ordering[ScalaVersion] =
Ordering.by(version => (version.major, version.minor, version.patch))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ private[scalacoptions] trait ScalacOptions {
val warnNonUnitStatement =
warnOption(
"nonunit-statement",
version => version.isBetween(V2_13_9, V3_0_0)
version => version.isBetween(V2_13_9, V3_0_0) || version.isAtLeast(V3_3_1)
)

/** Fail the compilation if there are any warnings.
Expand Down

0 comments on commit f25b725

Please sign in to comment.