I installed Scala 3.4.1 on MacOs with brew. scala command runs and opens scala command line as 3.4.1 but getting version information as 2.13.12
scala --version
Scala code runner version 3.4.1 -- Copyright 2002-2024, LAMP/EPFL
Welcome to Scala 3.4.1 (21.0.3, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> util.Properties.versionString
val res0: String = version 2.13.12
even intelliJ returns version 2.13.12 for
println(util.Properties.versionString)
Any idea?
By the docs of Properties.versionNumberString
:
The version of the Scala runtime, or the empty string if unknown.
Note that the version of the Scala library need not correlate with the version of the Scala compiler used to emit either the library or user code.
For example, Scala 3.0 and 3.1 use the Scala 2.13 library, which is reflected in this version