diff options
Diffstat (limited to 'sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion')
6 files changed, 29 insertions, 0 deletions
diff --git a/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/A.scala b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/A.scala new file mode 100644 index 000000000..9917b2d98 --- /dev/null +++ b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/A.scala @@ -0,0 +1 @@ +case class A(x: Int) diff --git a/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/B.scala b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/B.scala new file mode 100644 index 000000000..be302fe40 --- /dev/null +++ b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/B.scala @@ -0,0 +1,3 @@ +object B { + A(0) +} diff --git a/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/changes/A2.scala b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/changes/A2.scala new file mode 100644 index 000000000..3d35a445f --- /dev/null +++ b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/changes/A2.scala @@ -0,0 +1,2 @@ +case class A(x: Int) +private object A diff --git a/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/dbg.sbt b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/dbg.sbt new file mode 100644 index 000000000..1ac0e14e9 --- /dev/null +++ b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/dbg.sbt @@ -0,0 +1,2 @@ +logLevel := Level.Debug +incOptions ~= { _.copy(apiDebug = true, relationsDebug = true) } diff --git a/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/project/DottyInjectedPlugin.scala b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/project/DottyInjectedPlugin.scala new file mode 100644 index 000000000..3433779b6 --- /dev/null +++ b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/project/DottyInjectedPlugin.scala @@ -0,0 +1,17 @@ +import sbt._ +import Keys._ + +object DottyInjectedPlugin extends AutoPlugin { + override def requires = plugins.JvmPlugin + override def trigger = allRequirements + + override val projectSettings = Seq( + scalaVersion := "0.1-SNAPSHOT", + scalaOrganization := "ch.epfl.lamp", + scalacOptions += "-language:Scala2", + scalaBinaryVersion := "2.11", + autoScalaLibrary := false, + libraryDependencies ++= Seq("org.scala-lang" % "scala-library" % "2.11.5"), + scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-bridge" % "0.1.1-SNAPSHOT" % "component").sources() + ) +} diff --git a/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/test b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/test new file mode 100644 index 000000000..f3a023810 --- /dev/null +++ b/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/test @@ -0,0 +1,4 @@ +> compile +$ copy-file changes/A2.scala A.scala +# Compilation of B.scala should fail because object A does not extend `Int => A` anymore +-> compile |