diff options
author | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-12 22:44:33 +0100 |
---|---|---|
committer | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-12 22:44:33 +0100 |
commit | 9ef5f6817688f814a3450126aa7383b0928e80a0 (patch) | |
tree | 5727a2f7f7fd665cefdb312af2785c692f04377c /tests/untried/neg/t7494-multi-right-after | |
parent | 194be919664447631ba55446eb4874979c908d27 (diff) | |
download | dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.gz dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.bz2 dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.zip |
add tests from scala/test/files/{pos,neg}
with explicit Unit return type
Diffstat (limited to 'tests/untried/neg/t7494-multi-right-after')
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> + |