diff options
Diffstat (limited to 'bridge/src/sbt-test/source-dependencies/var')
5 files changed, 36 insertions, 0 deletions
diff --git a/bridge/src/sbt-test/source-dependencies/var/A.scala b/bridge/src/sbt-test/source-dependencies/var/A.scala new file mode 100644 index 000000000..1c5d96e09 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/var/A.scala @@ -0,0 +1,5 @@ +class A +{ + def x = 3 + def x_=(x$1: Int) = () +}
\ No newline at end of file diff --git a/bridge/src/sbt-test/source-dependencies/var/B.scala b/bridge/src/sbt-test/source-dependencies/var/B.scala new file mode 100644 index 000000000..3ee290f84 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/var/B.scala @@ -0,0 +1,4 @@ +class B extends A +{ + override var x = 3 +}
\ No newline at end of file diff --git a/bridge/src/sbt-test/source-dependencies/var/changes/A.scala b/bridge/src/sbt-test/source-dependencies/var/changes/A.scala new file mode 100644 index 000000000..d1c251596 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/var/changes/A.scala @@ -0,0 +1,4 @@ +class A +{ + var x = 3 +}
\ No newline at end of file diff --git a/bridge/src/sbt-test/source-dependencies/var/project/DottyInjectedPlugin.scala b/bridge/src/sbt-test/source-dependencies/var/project/DottyInjectedPlugin.scala new file mode 100644 index 000000000..3433779b6 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/var/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/var/test b/bridge/src/sbt-test/source-dependencies/var/test new file mode 100644 index 000000000..1da88684d --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/var/test @@ -0,0 +1,6 @@ +> compile + +# replace var x with def x, def x_= +$ copy-file changes/A.scala A.scala + +-> compile
\ No newline at end of file |