Skip to content

Commit

Permalink
Remove duplicate comma from Matchable selector warning (#20159)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrd authored Apr 11, 2024
2 parents 9b3495a + 1ac72fd commit 4f17e25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/reporting/messages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,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) =
Expand Down
2 changes: 1 addition & 1 deletion tests/pos-with-compiler-cc/dotc/reporting/messages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand Down

0 comments on commit 4f17e25

Please sign in to comment.