scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

incorrect version in `scala.util.Properties` #13042

Closed m-gris closed 1 month ago

m-gris commented 1 month ago

Environment

Issue Description

When using Scala CLI (version 1.5.1) with Scala 3.5.1, scala.util.Properties.versionString reports Scala version 2.13.14, despite the REPL running Scala 3.5.1 features correctly.

Steps to Reproduce

  1. Start Scala CLI REPL:
    scala-cli repl -S 3.5.1
  2. Check Scala version property:
    scala.util.Properties.versionString
  3. Test a Scala 3-specific feature:

    enum Color:
     case Red, Green, Blue
    
    Color.Red

Actual Behavior

Expected Behavior

scala.util.Properties.versionString should report version 3.5.1, matching the actual Scala version in use.

Additional Information

som-snytt commented 1 month ago

This is a FAQ. https://docs.scala-lang.org/tutorials/FAQ/index.html#i-want-scala-3-why-does-versionnumberstring-say-im-on-213

m-gris commented 1 month ago

Noted. Thx.