Skip to content

Commit c63519c

Browse files
committed
Fix wording in error message
1 parent c52b8f5 commit c63519c

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
@@ -607,10 +607,10 @@ trait Checking {
607607
def fail(pat: Tree, pt: Type): Boolean = {
608608
var reportedPt = pt.dropAnnot(defn.UncheckedAnnot)
609609
if (!pat.tpe.isSingleton) reportedPt = reportedPt.widen
610-
val problem = if (pat.tpe <:< pt) "is more specialized" else "does not match"
610+
val problem = if (pat.tpe <:< pt) "is more specialized than" else "does not match"
611611
val fix = if (isPatDef) "`: @unchecked` after" else "`case ` before"
612612
ctx.errorOrMigrationWarning(
613-
ex"""pattern's type ${pat.tpe} $problem than the right hand side expression's type $reportedPt
613+
ex"""pattern's type ${pat.tpe} $problem the right hand side expression's type $reportedPt
614614
|
615615
|If the narrowing is intentional, this can be communicated by writing $fix the full pattern.${err.rewriteNotice}""",
616616
pat.sourcePos)

0 commit comments

Comments
 (0)