dotty.tools.dotc.config.ScalaRelease.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala3-compiler_3 Show documentation
Show all versions of scala3-compiler_3 Show documentation
scala3-compiler-bootstrapped
package dotty.tools.dotc.config
enum ScalaRelease(val majorVersion: Int, val minorVersion: Int) extends Ordered[ScalaRelease]:
case Release3_0 extends ScalaRelease(3, 0)
case Release3_1 extends ScalaRelease(3, 1)
case Release3_2 extends ScalaRelease(3, 2)
def show = s"$majorVersion.$minorVersion"
def compare(that: ScalaRelease) =
val ord = summon[Ordering[(Int, Int)]]
ord.compare((majorVersion, minorVersion), (that.majorVersion, that.minorVersion))
object ScalaRelease:
def latest = Release3_1
def parse(name: String) = name match
case "3.0" => Some(Release3_0)
case "3.1" => Some(Release3_1)
case "3.2" => Some(Release3_2)
case _ => None
© 2015 - 2025 Weber Informatics LLC | Privacy Policy