diff options
Diffstat (limited to 'bridge/src/sbt-test/source-dependencies/variance')
5 files changed, 30 insertions, 0 deletions
diff --git a/bridge/src/sbt-test/source-dependencies/variance/A.scala b/bridge/src/sbt-test/source-dependencies/variance/A.scala new file mode 100644 index 000000000..4581bfec8 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/variance/A.scala @@ -0,0 +1,2 @@ +class A[+T] +
\ No newline at end of file diff --git a/bridge/src/sbt-test/source-dependencies/variance/C.scala b/bridge/src/sbt-test/source-dependencies/variance/C.scala new file mode 100644 index 000000000..8b526d9af --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/variance/C.scala @@ -0,0 +1,3 @@ +object C { + val a: A[Any] = new A[Int] +} diff --git a/bridge/src/sbt-test/source-dependencies/variance/changes/A.scala b/bridge/src/sbt-test/source-dependencies/variance/changes/A.scala new file mode 100644 index 000000000..e9c64dff6 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/variance/changes/A.scala @@ -0,0 +1,2 @@ +class A[T] +
\ No newline at end of file diff --git a/bridge/src/sbt-test/source-dependencies/variance/project/DottyInjectedPlugin.scala b/bridge/src/sbt-test/source-dependencies/variance/project/DottyInjectedPlugin.scala new file mode 100644 index 000000000..3433779b6 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/variance/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/variance/test b/bridge/src/sbt-test/source-dependencies/variance/test new file mode 100644 index 000000000..d74e441e7 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/variance/test @@ -0,0 +1,6 @@ +> compile + +# make T invariant +$ copy-file changes/A.scala A.scala + +-> compile
\ No newline at end of file |