summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2013-08-21 04:34:07 -0700
committerSom Snytt <som.snytt@gmail.com>2013-08-21 18:02:46 -0700
commit5edf50dd5f50d921311795dc614c3c25425c783a (patch)
treece9c3556354b9ae9f837746df752028b0fa1375c
parent1683c95e159006d40a8458d29ef266ca741752c7 (diff)
downloadscala-5edf50dd5f50d921311795dc614c3c25425c783a.tar.gz
scala-5edf50dd5f50d921311795dc614c3c25425c783a.tar.bz2
scala-5edf50dd5f50d921311795dc614c3c25425c783a.zip
SI-7622 Scaladoc and error message polish
Restores the verbiage "run right after".
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala9
-rw-r--r--src/compiler/scala/tools/nsc/PhaseAssembly.scala2
-rw-r--r--test/files/neg/t7494-multi-right-after.check2
-rw-r--r--test/files/neg/t7622-multi-followers.check2
4 files changed, 12 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 3c8a4faa7d..4e750792cb 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -763,6 +763,15 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
phaseHelp("new flags", elliptically = false, fmt)
}
+ /** Emit a verbose phase table.
+ * The table includes the phase id in the current assembly,
+ * or "oo" to indicate a skipped phase, or "xx" to indicate
+ * a disabled phase.
+ *
+ * @param title descriptive header
+ * @param elliptically whether to truncate the description with an ellipsis (...)
+ * @param describe how to describe a component
+ */
def phaseHelp(title: String, elliptically: Boolean, describe: SubComponent => String) = {
val Limit = 16 // phase names should not be absurdly long
val MaxCol = 80 // because some of us edit on green screens
diff --git a/src/compiler/scala/tools/nsc/PhaseAssembly.scala b/src/compiler/scala/tools/nsc/PhaseAssembly.scala
index 45502a19d6..996f6efe55 100644
--- a/src/compiler/scala/tools/nsc/PhaseAssembly.scala
+++ b/src/compiler/scala/tools/nsc/PhaseAssembly.scala
@@ -150,7 +150,7 @@ trait PhaseAssembly {
} else if (sanity.length > 1) {
dump("phase-order")
val following = (sanity map (_.frm.phasename)).sorted mkString ","
- throw new FatalError(s"Phase ${sanity.head.to.phasename} has too many followers: $following; created phase-order.dot")
+ throw new FatalError(s"Multiple phases want to run right after ${sanity.head.to.phasename}; followers: $following; created phase-order.dot")
} else {
val promote = hl.to.before.filter(e => (!e.hard))
diff --git a/test/files/neg/t7494-multi-right-after.check b/test/files/neg/t7494-multi-right-after.check
index c0e0334aaf..151d177414 100644
--- a/test/files/neg/t7494-multi-right-after.check
+++ b/test/files/neg/t7494-multi-right-after.check
@@ -1 +1 @@
-error: Phase explicitouter has too many followers: erasure,multi-rafter; created phase-order.dot
+error: Multiple phases want to run right after explicitouter; followers: erasure,multi-rafter; created phase-order.dot
diff --git a/test/files/neg/t7622-multi-followers.check b/test/files/neg/t7622-multi-followers.check
index 5cda422ff0..d123853a5b 100644
--- a/test/files/neg/t7622-multi-followers.check
+++ b/test/files/neg/t7622-multi-followers.check
@@ -1 +1 @@
-error: Phase parser has too many followers: multi1,multi2; created phase-order.dot
+error: Multiple phases want to run right after parser; followers: multi1,multi2; created phase-order.dot