Skip to content

Commit

Permalink
move scala 2 test to sbt-test
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha committed Nov 17, 2022
1 parent 1a484de commit ced7f55
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
File renamed without changes.
13 changes: 13 additions & 0 deletions sbt-test/scala2-compat/i16351/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
val scala3Version = sys.props("plugin.scalaVersion")
val scala2Version = sys.props("plugin.scala2Version")

lazy val lib = project.in(file("lib"))
.settings(
scalaVersion := scala2Version
)

lazy val app = project.in(file("app"))
.dependsOn(lib)
.settings(
scalaVersion := scala3Version
)
File renamed without changes.
1 change: 1 addition & 0 deletions sbt-test/scala2-compat/i16351/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> app/compile
7 changes: 7 additions & 0 deletions tests/init/pos/i9795/A.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class A:
// Safe initialization check only allows capturing `this` either through primary constructor or synthetic `apply`
// `Some` case class comes from Scala 2 stdlib, which is not visible, hence the warning
// For reference:
// https://github.com/lampepfl/dotty/pull/12711
// https://github.com/lampepfl/dotty/pull/14283
val some = Some(this)

0 comments on commit ced7f55

Please sign in to comment.