Skip to content

Commit ced7f55

Browse files
committed
move scala 2 test to sbt-test
1 parent 1a484de commit ced7f55

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
val scala3Version = sys.props("plugin.scalaVersion")
2+
val scala2Version = sys.props("plugin.scala2Version")
3+
4+
lazy val lib = project.in(file("lib"))
5+
.settings(
6+
scalaVersion := scala2Version
7+
)
8+
9+
lazy val app = project.in(file("app"))
10+
.dependsOn(lib)
11+
.settings(
12+
scalaVersion := scala3Version
13+
)

sbt-test/scala2-compat/i16351/test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
> app/compile

tests/init/pos/i9795/A.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class A:
2+
// Safe initialization check only allows capturing `this` either through primary constructor or synthetic `apply`
3+
// `Some` case class comes from Scala 2 stdlib, which is not visible, hence the warning
4+
// For reference:
5+
// https://github.com/lampepfl/dotty/pull/12711
6+
// https://github.com/lampepfl/dotty/pull/14283
7+
val some = Some(this)

0 commit comments

Comments
 (0)