aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/t7494-multi-right-after
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/t7494-multi-right-after')
-rw-r--r--tests/untried/neg/t7494-multi-right-after/ThePlugin.scala31
-rw-r--r--tests/untried/neg/t7494-multi-right-after/sample_2.flags1
-rw-r--r--tests/untried/neg/t7494-multi-right-after/sample_2.scala6
-rw-r--r--tests/untried/neg/t7494-multi-right-after/scalac-plugin.xml5
4 files changed, 43 insertions, 0 deletions
diff --git a/tests/untried/neg/t7494-multi-right-after/ThePlugin.scala b/tests/untried/neg/t7494-multi-right-after/ThePlugin.scala
new file mode 100644
index 000000000..cb9e86e90
--- /dev/null
+++ b/tests/untried/neg/t7494-multi-right-after/ThePlugin.scala
@@ -0,0 +1,31 @@
+package scala.test.plugins
+
+import scala.tools.nsc
+import nsc.Global
+import nsc.Phase
+import nsc.plugins.Plugin
+import nsc.plugins.PluginComponent
+
+class ThePlugin(val global: Global) extends Plugin {
+ import global._
+
+ val name = "multi-rafter"
+ val description = ""
+ val components = List[PluginComponent](thePhase)
+
+ private object thePhase extends PluginComponent {
+ val global = ThePlugin.this.global
+
+ val runsAfter = List[String]()
+ override val runsRightAfter = Some("explicitouter")
+ val phaseName = ThePlugin.this.name
+
+ def newPhase(prev: Phase) = new ThePhase(prev)
+ }
+
+ private class ThePhase(prev: Phase) extends Phase(prev) {
+ def name = ThePlugin.this.name
+ def run: Unit = {}
+ }
+}
+
diff --git a/tests/untried/neg/t7494-multi-right-after/sample_2.flags b/tests/untried/neg/t7494-multi-right-after/sample_2.flags
new file mode 100644
index 000000000..9273fb98d
--- /dev/null
+++ b/tests/untried/neg/t7494-multi-right-after/sample_2.flags
@@ -0,0 +1 @@
+-Xplugin:. -Xplugin-require:multi-rafter
diff --git a/tests/untried/neg/t7494-multi-right-after/sample_2.scala b/tests/untried/neg/t7494-multi-right-after/sample_2.scala
new file mode 100644
index 000000000..73cdc64e4
--- /dev/null
+++ b/tests/untried/neg/t7494-multi-right-after/sample_2.scala
@@ -0,0 +1,6 @@
+
+package sample
+
+// just a sample that is compiled with the sample plugin enabled
+object Sample extends App {
+}
diff --git a/tests/untried/neg/t7494-multi-right-after/scalac-plugin.xml b/tests/untried/neg/t7494-multi-right-after/scalac-plugin.xml
new file mode 100644
index 000000000..2558d6fd0
--- /dev/null
+++ b/tests/untried/neg/t7494-multi-right-after/scalac-plugin.xml
@@ -0,0 +1,5 @@
+<plugin>
+ <name>ignored</name>
+ <classname>scala.test.plugins.ThePlugin</classname>
+</plugin>
+