Skip to content

Commit a73eb36

Browse files
committed
Make links abstract and add the val in every error message class
1 parent 5f99572 commit a73eb36

File tree

3 files changed

+155
-21
lines changed

3 files changed

+155
-21
lines changed

compiler/src/dotty/tools/dotc/reporting/diagnostic/Message.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ abstract class Message(val errorId: ErrorMessageID) { self =>
8989
/** Links may list URLs to Internet resources related to the error
9090
* e.g. the Scala Language Specification.
9191
*/
92-
val links: List[DocumentationLink] = Nil
92+
val links: List[DocumentationLink]
9393

9494
/** The implicit `Context` in messages is a large thing that we don't want
9595
* persisted. This method gets around that by duplicating the message
@@ -119,6 +119,7 @@ class ExtendMessage(_msg: () => Message)(f: String => String) { self =>
119119
val msg = self.msg
120120
val kind = self.kind
121121
val explanation = self.explanation
122+
val links = Nil
122123
}
123124

124125
/** Enclose this message in an `Error` container */
@@ -154,6 +155,7 @@ class ExtendMessage(_msg: () => Message)(f: String => String) { self =>
154155
class NoExplanation(val msg: String) extends Message(ErrorMessageID.NoExplanationID) {
155156
val explanation = ""
156157
val kind = ""
158+
val links = Nil
157159

158160
override def toString(): String = s"NoExplanation($msg)"
159161
}

0 commit comments

Comments
 (0)