diff options
Diffstat (limited to 'bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope')
7 files changed, 44 insertions, 0 deletions
diff --git a/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/A1.scala b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/A1.scala new file mode 100644 index 000000000..5a58c097b --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/A1.scala @@ -0,0 +1,2 @@ +trait A +object A diff --git a/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/A2.scala b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/A2.scala new file mode 100644 index 000000000..8a0b629bc --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/A2.scala @@ -0,0 +1,4 @@ +trait A +object A { + implicit def m[A]: M[A] = ??? +} diff --git a/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/B.scala b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/B.scala new file mode 100644 index 000000000..c49ed55ad --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/B.scala @@ -0,0 +1,2 @@ + +trait B extends A diff --git a/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/C.scala b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/C.scala new file mode 100644 index 000000000..7fd803222 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/C.scala @@ -0,0 +1,3 @@ +object Test { + implicitly[M[B]] +} diff --git a/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/M.scala b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/M.scala new file mode 100644 index 000000000..9464f4238 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/changes/M.scala @@ -0,0 +1,4 @@ +class M[A](a: A) +object M { + implicit def m[A]: M[A] = ??? +} diff --git a/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/project/DottyInjectedPlugin.scala b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/project/DottyInjectedPlugin.scala new file mode 100644 index 000000000..3433779b6 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/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/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/test b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/test new file mode 100644 index 000000000..701b2c9a5 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/implicit-search-companion-scope/test @@ -0,0 +1,12 @@ +# Tests if dependencies on implicit scope are tracked properly +$ copy-file changes/A1.scala A.scala +$ copy-file changes/B.scala B.scala +$ copy-file changes/M.scala M.scala +$ copy-file changes/C.scala C.scala +> compile + +$ copy-file changes/A2.scala A.scala +-> compile + +> clean +-> compile |