Skip to content

Commit 8f0b407

Browse files
committed
Add -language:Scala2 by default
1 parent 277bee9 commit 8f0b407

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build.sbt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ lazy val root = (project in file(".")).
99
// Dotty version
1010
scalaVersion := "0.1-SNAPSHOT",
1111

12+
// Enable Scala 2 compatibility mode.
13+
// This will allow you to use Scala 2 features that have been removed
14+
// from Dotty, like procedure syntax.
15+
// This is not required to compile code with Dotty, but it makes it easier
16+
// to test Dotty on an existing Scala 2 code base.
17+
// The long-term plan is to have a rewriting tool that can do most of the
18+
// porting work for you.
19+
scalacOptions ++= Seq("-language:Scala2"),
20+
1221
// Note: Dotty can use Scala 2.11 libraries so we set `scalaBinaryVersion`
1322
// to `2.11` for convenience. However, if you publish an artefact compiled
1423
// with Dotty, you should set it to `0.1`, this will force you to change

0 commit comments

Comments
 (0)