diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-09-30 15:49:22 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:12:28 +0200 |
commit | d4f00691c4a26f716cbf29878022309a741de070 (patch) | |
tree | ca1983f97f19c08bebb0f58dd5649e26d82f5312 /bridge/src/sbt-test/source-dependencies | |
parent | f239bdb79f57855544b313573117e5603d038383 (diff) | |
download | dotty-d4f00691c4a26f716cbf29878022309a741de070.tar.gz dotty-d4f00691c4a26f716cbf29878022309a741de070.tar.bz2 dotty-d4f00691c4a26f716cbf29878022309a741de070.zip |
Fix incremental compilation when inline method signature changes
Diffstat (limited to 'bridge/src/sbt-test/source-dependencies')
6 files changed, 39 insertions, 0 deletions
diff --git a/bridge/src/sbt-test/source-dependencies/inline/A.scala b/bridge/src/sbt-test/source-dependencies/inline/A.scala new file mode 100644 index 000000000..e889eef79 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/inline/A.scala @@ -0,0 +1,3 @@ +object A { + def get: Int = 1 +} diff --git a/bridge/src/sbt-test/source-dependencies/inline/C.scala b/bridge/src/sbt-test/source-dependencies/inline/C.scala new file mode 100644 index 000000000..0370943e1 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/inline/C.scala @@ -0,0 +1,5 @@ +object C { + def test: Unit = { + val i: Int = B.getInline + } +} diff --git a/bridge/src/sbt-test/source-dependencies/inline/changes/B1.scala b/bridge/src/sbt-test/source-dependencies/inline/changes/B1.scala new file mode 100644 index 000000000..5685152b3 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/inline/changes/B1.scala @@ -0,0 +1,4 @@ +object B { + @inline def getInline: Int = + A.get +} diff --git a/bridge/src/sbt-test/source-dependencies/inline/changes/B2.scala b/bridge/src/sbt-test/source-dependencies/inline/changes/B2.scala new file mode 100644 index 000000000..1de104357 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/inline/changes/B2.scala @@ -0,0 +1,4 @@ +object B { + @inline def getInline: Double = + A.get +} diff --git a/bridge/src/sbt-test/source-dependencies/inline/project/DottyInjectedPlugin.scala b/bridge/src/sbt-test/source-dependencies/inline/project/DottyInjectedPlugin.scala new file mode 100644 index 000000000..3433779b6 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/inline/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/inline/test b/bridge/src/sbt-test/source-dependencies/inline/test new file mode 100644 index 000000000..ba891710f --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/inline/test @@ -0,0 +1,6 @@ +$ copy-file changes/B1.scala B.scala +> compile + +$ copy-file changes/B2.scala B.scala +# Compilation of C.scala should fail because B.getInline now has type Double instead of Int +-> compile |