Skip to content

Commit 1106c5d

Browse files
guersamWojciechMazur
authored andcommitted
Remove duplicate comma from Matchable selector warning
[Cherry-picked 1ac72fd]
1 parent a3004fa commit 1106c5d

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
@@ -921,7 +921,7 @@ class MatchableWarning(tp: Type, pattern: Boolean)(using Context)
921921
extends TypeMsg(MatchableWarningID) {
922922
def msg(using Context) =
923923
val kind = if pattern then "pattern selector" else "value"
924-
i"""${kind} should be an instance of Matchable,,
924+
i"""${kind} should be an instance of Matchable,
925925
|but it has unmatchable type $tp instead"""
926926

927927
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)