Language Versions

The default Scala language version currently supported by the Dotty compiler is 3.0. There are also other language versions that can be specified instead:

There are two ways to specify a language version.

package p
import scala.language.`3.1`

class C { ... }

Language imports supersede command-line settings in the compilation units where they are specified. Only one language import is allowed in a compilation unit, and it must come before any definitions in that unit.