Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport "Remove duplicate comma from Matchable selector warning" to LTS #21057

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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) =
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