diff --git a/compiler/src/dotty/tools/dotc/reporting/messages.scala b/compiler/src/dotty/tools/dotc/reporting/messages.scala index 16e0392764b6..d6d9bd8bc868 100644 --- a/compiler/src/dotty/tools/dotc/reporting/messages.scala +++ b/compiler/src/dotty/tools/dotc/reporting/messages.scala @@ -921,7 +921,7 @@ class MatchableWarning(tp: Type, pattern: Boolean)(using Context) extends TypeMsg(MatchableWarningID) { def msg(using Context) = val kind = if pattern then "pattern selector" else "value" - i"""${kind} should be an instance of Matchable,, + i"""${kind} should be an instance of Matchable, |but it has unmatchable type $tp instead""" def explain(using Context) = diff --git a/tests/pos-with-compiler-cc/dotc/reporting/messages.scala b/tests/pos-with-compiler-cc/dotc/reporting/messages.scala index 142ac63af0f3..cd5c5f67ff41 100644 --- a/tests/pos-with-compiler-cc/dotc/reporting/messages.scala +++ b/tests/pos-with-compiler-cc/dotc/reporting/messages.scala @@ -873,7 +873,7 @@ class MatchableWarning(tp: Type, pattern: Boolean)(using DetachedContext) extends TypeMsg(MatchableWarningID) { def msg(using Context) = val kind = if pattern then "pattern selector" else "value" - i"""${kind} should be an instance of Matchable,, + i"""${kind} should be an instance of Matchable, |but it has unmatchable type $tp instead""" def explain(using Context) =