File tree Expand file tree Collapse file tree 5 files changed +41
-0
lines changed
sbt-dotty/sbt-test/scala2-compat/i8847 Expand file tree Collapse file tree 5 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ val scala3Version = sys.props(" plugin.scalaVersion" )
2+ val scala2Version = " 2.13.3"
3+
4+ lazy val `i8847-lib` = (project in file (" lib" ))
5+ .settings(scalaVersion := scala2Version)
6+
7+ lazy val `i8847-test` = (project in file (" main" ))
8+ .dependsOn(`i8847-lib`)
9+ .settings(
10+ scalaVersion := scala3Version,
11+ // https://github.com/sbt/sbt/issues/5369
12+ projectDependencies := {
13+ projectDependencies.value.map(_.withDottyCompat(scalaVersion.value))
14+ }
15+ )
Original file line number Diff line number Diff line change 1+ package i8847
2+
3+ trait P {
4+ // The `private` modifier is needed, and `X` must be a case class or case object
5+ private case class X (x : Int )
6+ private case object Y
7+ }
8+
9+ trait Foo {
10+ def foo (): Unit = ???
11+ }
12+
13+ trait Bar extends Foo {
14+ override def foo (): Unit = super .foo()
15+ }
16+
17+ trait Baz extends Foo {
18+ override def foo (): Unit = super .foo()
19+ }
Original file line number Diff line number Diff line change 1+ import i8847 .{P , Bar , Baz }
2+
3+ class T extends P
4+
5+ class C extends Bar with Baz
Original file line number Diff line number Diff line change 1+ addSbtPlugin(" ch.epfl.lamp" % " sbt-dotty" % sys.props(" plugin.version" ))
Original file line number Diff line number Diff line change 1+ > i8847-test/compile
You can’t perform that action at this time.
0 commit comments