aboutsummaryrefslogtreecommitdiff
path: root/sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-10-11 17:28:39 +0200
committerGuillaume Martres <smarter@ubuntu.com>2016-11-22 01:35:06 +0100
commit2d10c87ce537fb42fdb134efcae53dca7305a7b7 (patch)
treea3629c9a3ad6db3e9d07df8fa8621f8c8211076c /sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion
parent34d64f381362b12a595fd26690c7c9b1c26d16f7 (diff)
downloaddotty-2d10c87ce537fb42fdb134efcae53dca7305a7b7.tar.gz
dotty-2d10c87ce537fb42fdb134efcae53dca7305a7b7.tar.bz2
dotty-2d10c87ce537fb42fdb134efcae53dca7305a7b7.zip
Move sbt-bridge
Diffstat (limited to 'sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion')
-rw-r--r--sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/A.scala1
-rw-r--r--sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/B.scala3
-rw-r--r--sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/changes/A2.scala2
-rw-r--r--sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/dbg.sbt2
-rw-r--r--sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/project/DottyInjectedPlugin.scala17
-rw-r--r--sbt-bridge/bridge/src/sbt-test/source-dependencies/synthetic-companion/test4
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