Skip to content

Commit 18c05d0

Browse files
committed
Fix wording in error message
1 parent 662958e commit 18c05d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,10 @@ trait Checking {
609609
else {
610610
var reportedPt = pt.dropAnnot(defn.UncheckedAnnot)
611611
if (!pat.tpe.isSingleton) reportedPt = reportedPt.widen
612-
val problem = if (pat.tpe <:< pt) "is more specialized" else "does not match"
612+
val problem = if (pat.tpe <:< pt) "is more specialized than" else "does not match"
613613
val fix = if (isPatDef) "`: @unchecked` after" else "`case ` before"
614614
ctx.errorOrMigrationWarning(
615-
ex"""pattern's type ${pat.tpe} $problem than the right hand side expression's type $reportedPt
615+
ex"""pattern's type ${pat.tpe} $problem the right hand side expression's type $reportedPt
616616
|
617617
|If the narrowing is intentional, this can be communicated by writing $fix the full pattern.${err.rewriteNotice}""",
618618
pat.sourcePos)

0 commit comments

Comments
 (0)