We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ab1ced commit d8a0826Copy full SHA for d8a0826
project/ScalaVersionHelper.scala
@@ -1,11 +1,15 @@
1
object ScalaVersionHelper {
2
- def isStdLibCompat_213(scalaVersion: String): Boolean = {
3
- scalaVersion.startsWith("2.13") ||
4
- isDotty(scalaVersion)
5
- }
6
7
- def isDotty(scalaVersion: String): Boolean = {
8
- scalaVersion.startsWith("3.") ||
9
- scalaVersion.matches("""0\.(?:1[8-]|2).*""")
10
+ val dotty_series = """(?:3|0\.(?:1[8-9]|[2-9])).*""".r
+ val scala_series = """2\.(?:1[3-9]|[2-9]).*""".r
+
+ def isStdLibCompat_213(scalaVersion: String): Boolean = scalaVersion match {
+ case scala_series() | dotty_series() => true
+ case _ => false
+ }
11
+ def isDotty(scalaVersion: String): Boolean = scalaVersion match {
12
+ case dotty_series() => true
13
14
15
}
0 commit comments