File tree 1 file changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -609,10 +609,10 @@ trait Checking {
609
609
else {
610
610
var reportedPt = pt.dropAnnot(defn.UncheckedAnnot )
611
611
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"
613
613
val fix = if (isPatDef) " `: @unchecked` after" else " `case ` before"
614
614
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
616
616
|
617
617
|If the narrowing is intentional, this can be communicated by writing $fix the full pattern. ${err.rewriteNotice}""" ,
618
618
pat.sourcePos)
You can’t perform that action at this time.
0 commit comments