aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
diff options
context:
space:
mode:
authorMatthias Sperl <sperl.matthias0@gmail.com>2016-10-26 10:40:15 +0200
committerMatthias Sperl <sperl.matthias0@gmail.com>2016-10-31 11:22:47 +0100
commitba7f0112ea5174ba2a70c2b6d9f1744508183c78 (patch)
treeec5c06ec3f55a67b25b24afedd5671c473292d4e /src/dotty/tools/dotc/reporting/diagnostic/messages.scala
parentaae401977959940955479cfc65bf437820e3e395 (diff)
downloaddotty-ba7f0112ea5174ba2a70c2b6d9f1744508183c78.tar.gz
dotty-ba7f0112ea5174ba2a70c2b6d9f1744508183c78.tar.bz2
dotty-ba7f0112ea5174ba2a70c2b6d9f1744508183c78.zip
Add error message Parsers.scala:1620 missing type keyword
Diffstat (limited to 'src/dotty/tools/dotc/reporting/diagnostic/messages.scala')
-rw-r--r--src/dotty/tools/dotc/reporting/diagnostic/messages.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
index 2913f4f4c..67d53fd22 100644
--- a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
+++ b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
@@ -677,5 +677,18 @@ object messages {
|
|$fixedVarInAlternative""".stripMargin
}
+ }
+
+ case class TypeParamsTypeExpected(mods: Modifiers, identifier: TermName)(implicit ctx: Context) extends Message(24) {
+ val kind = "Syntax"
+
+ val msg = hl"""Expected ${"type"} keyword for type parameter $identifier"""
+
+ val explanation = hl"""|This happens when you add modifiers like ${"private"} or ${"protected"}
+ |to your type parameter definition without adding the ${"type"} keyword.
+ |
+ |Add ${"type"} to your code, e.g.:
+ |${s"trait A[${mods.flags} type $identifier]"}
+ |""".stripMargin
}
}