From 00d49e3a3ffdc6bd0658e011e061d8697913705a Mon Sep 17 00:00:00 2001
From: "Paolo G. Giarrusso"
Date: Sun, 1 Dec 2019 15:51:52 +0100
Subject: [PATCH 1/2] Fix `kind` of a couple errors
The first was pointed out in https://github.com/lampepfl/dotty/issues/6892.
---
.../src/dotty/tools/dotc/reporting/diagnostic/messages.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala b/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
index 287cf5fc73ad..46813bb14a6e 100644
--- a/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
+++ b/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
@@ -196,7 +196,7 @@ object messages {
pt: Type)
(implicit ctx: Context)
extends Message(AnonymousFunctionMissingParamTypeID) {
- val kind: String = "Syntax"
+ val kind: String = "Type"
val msg: String = {
val ofFun =
@@ -2298,7 +2298,7 @@ object messages {
}
case class StableIdentPattern(tree: untpd.Tree, pt: Type)(implicit val ctx: Context)
extends Message(StableIdentPatternID) {
- override def kind: String = "Syntax"
+ override def kind: String = "Type"
override def msg: String =
em"""Stable identifier required, but $tree found"""
override def explanation: String = ""
From feecfba09f81f201cbfe863676c10b77ea1f4224 Mon Sep 17 00:00:00 2001
From: "Paolo G. Giarrusso"
Date: Sun, 1 Dec 2019 15:52:42 +0100
Subject: [PATCH 2/2] Fix kind for IllegalCyclicTypeReference
Other similar errors use `Cyclic`, so let's be a bit more consistent here.
---
.../src/dotty/tools/dotc/reporting/diagnostic/messages.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala b/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
index 46813bb14a6e..1c5c1941ab25 100644
--- a/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
+++ b/compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala
@@ -2392,7 +2392,7 @@ object messages {
case class IllegalCyclicTypeReference(sym: Symbol, where: String, lastChecked: Type)(implicit val ctx: Context)
extends Message(IllegalCyclicTypeReferenceID) {
- val kind: String = "Type"
+ val kind: String = "Cyclic"
val msg: String = i"illegal cyclic type reference: ${where} ${hl(lastChecked.show)} of $sym refers back to the type itself"
val explanation: String = ""
}