diff options
Diffstat (limited to 'test/pending/neg/plugin-multiple-rafter')
5 files changed, 55 insertions, 0 deletions
diff --git a/test/pending/neg/plugin-multiple-rafter/lib/plugins.jar.desired.sha1 b/test/pending/neg/plugin-multiple-rafter/lib/plugins.jar.desired.sha1 new file mode 100644 index 0000000000..f4905fcbd4 --- /dev/null +++ b/test/pending/neg/plugin-multiple-rafter/lib/plugins.jar.desired.sha1 @@ -0,0 +1 @@ +2bda582b574287429ad5ee2e1d9a3effc88b0a5f ?plugins.jar diff --git a/test/pending/neg/plugin-multiple-rafter/misc/build.sh b/test/pending/neg/plugin-multiple-rafter/misc/build.sh new file mode 100755 index 0000000000..8899009d7f --- /dev/null +++ b/test/pending/neg/plugin-multiple-rafter/misc/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +SCALAC="../../../../build/pack/bin/scalac -deprecation -cp ../../../../build/quick/classes/compiler/" + +BASE=`pwd` + +if [[ -d "${BASE}/src" ]] ; then + + mkdir -p build + ${SCALAC} -d build src/*.scala + jar cf lib/plugins.jar -C misc/ scalac-plugin.xml -C build . + rm -rf build +fi + diff --git a/test/pending/neg/plugin-multiple-rafter/misc/scalac-plugin.xml b/test/pending/neg/plugin-multiple-rafter/misc/scalac-plugin.xml new file mode 100644 index 0000000000..90ff27dc2a --- /dev/null +++ b/test/pending/neg/plugin-multiple-rafter/misc/scalac-plugin.xml @@ -0,0 +1,5 @@ +<plugin> + <name>beforeparser</name> + <classname>scala.test.plugins.ThePlugin</classname> +</plugin> + diff --git a/test/pending/neg/plugin-multiple-rafter/src/ThePlugin.scala b/test/pending/neg/plugin-multiple-rafter/src/ThePlugin.scala new file mode 100644 index 0000000000..4c761517c1 --- /dev/null +++ b/test/pending/neg/plugin-multiple-rafter/src/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 {} + } +} + diff --git a/test/pending/neg/plugin-multiple-rafter/testsource.scala b/test/pending/neg/plugin-multiple-rafter/testsource.scala new file mode 100644 index 0000000000..f73db1eb60 --- /dev/null +++ b/test/pending/neg/plugin-multiple-rafter/testsource.scala @@ -0,0 +1,4 @@ +object Test extends Application { + println("multi-rafter") +} + |