aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-10-03 10:02:00 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-10-10 13:25:36 +0200
commit41d642947c678efdd392bd01c632ecd53fd26b48 (patch)
treebfee887364340f4eff37911f2f2e29234b42d7e2 /src/dotty/tools/dotc/reporting/diagnostic/messages.scala
parentf23ff3abba8663a0e7f64f79b556efd36cc86a83 (diff)
downloaddotty-41d642947c678efdd392bd01c632ecd53fd26b48.tar.gz
dotty-41d642947c678efdd392bd01c632ecd53fd26b48.tar.bz2
dotty-41d642947c678efdd392bd01c632ecd53fd26b48.zip
Get rid of unnecessary fields in `MessageContainer`
Diffstat (limited to 'src/dotty/tools/dotc/reporting/diagnostic/messages.scala')
-rw-r--r--src/dotty/tools/dotc/reporting/diagnostic/messages.scala40
1 files changed, 16 insertions, 24 deletions
diff --git a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
index 14978449a..e2b99af41 100644
--- a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
+++ b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
@@ -17,59 +17,51 @@ object messages {
// `MessageContainer`s to be consumed by `Reporter` ---------------------- //
class Error(
msgFn: => Message,
- pos: SourcePosition,
- explanation: String = ""
- ) extends MessageContainer(msgFn, pos, ERROR, explanation)
+ pos: SourcePosition
+ ) extends MessageContainer(msgFn, pos, ERROR)
class Warning(
msgFn: => Message,
- pos: SourcePosition,
- explanation: String = ""
- ) extends MessageContainer(msgFn, pos, WARNING, explanation)
+ pos: SourcePosition
+ ) extends MessageContainer(msgFn, pos, WARNING)
class Info(
msgFn: => Message,
- pos: SourcePosition,
- explanation: String = ""
- ) extends MessageContainer(msgFn, pos, INFO, explanation)
+ pos: SourcePosition
+ ) extends MessageContainer(msgFn, pos, INFO)
abstract class ConditionalWarning(
msgFn: => Message,
- pos: SourcePosition,
- explanation: String = ""
- ) extends Warning(msgFn, pos, explanation) {
+ pos: SourcePosition
+ ) extends Warning(msgFn, pos) {
def enablingOption(implicit ctx: Context): Setting[Boolean]
}
class FeatureWarning(
msgFn: => Message,
- pos: SourcePosition,
- explanation: String = ""
- ) extends ConditionalWarning(msgFn, pos, explanation) {
+ pos: SourcePosition
+ ) extends ConditionalWarning(msgFn, pos) {
def enablingOption(implicit ctx: Context) = ctx.settings.feature
}
class UncheckedWarning(
msgFn: => Message,
- pos: SourcePosition,
- explanation: String = ""
- ) extends ConditionalWarning(msgFn, pos, explanation) {
+ pos: SourcePosition
+ ) extends ConditionalWarning(msgFn, pos) {
def enablingOption(implicit ctx: Context) = ctx.settings.unchecked
}
class DeprecationWarning(
msgFn: => Message,
- pos: SourcePosition,
- explanation: String = ""
- ) extends ConditionalWarning(msgFn, pos, explanation) {
+ pos: SourcePosition
+ ) extends ConditionalWarning(msgFn, pos) {
def enablingOption(implicit ctx: Context) = ctx.settings.deprecation
}
class MigrationWarning(
msgFn: => Message,
- pos: SourcePosition,
- explanation: String = ""
- ) extends ConditionalWarning(msgFn, pos, explanation) {
+ pos: SourcePosition
+ ) extends ConditionalWarning(msgFn, pos) {
def enablingOption(implicit ctx: Context) = ctx.settings.migration
}