Skip to content

Commit 4f17e25

Browse files
authored
Remove duplicate comma from Matchable selector warning (#20159)
2 parents 9b3495a + 1ac72fd commit 4f17e25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/reporting/messages.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ class MatchableWarning(tp: Type, pattern: Boolean)(using Context)
924924
extends TypeMsg(MatchableWarningID) {
925925
def msg(using Context) =
926926
val kind = if pattern then "pattern selector" else "value"
927-
i"""${kind} should be an instance of Matchable,,
927+
i"""${kind} should be an instance of Matchable,
928928
|but it has unmatchable type $tp instead"""
929929

930930
def explain(using Context) =

tests/pos-with-compiler-cc/dotc/reporting/messages.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ class MatchableWarning(tp: Type, pattern: Boolean)(using DetachedContext)
873873
extends TypeMsg(MatchableWarningID) {
874874
def msg(using Context) =
875875
val kind = if pattern then "pattern selector" else "value"
876-
i"""${kind} should be an instance of Matchable,,
876+
i"""${kind} should be an instance of Matchable,
877877
|but it has unmatchable type $tp instead"""
878878

879879
def explain(using Context) =

0 commit comments

Comments
 (0)