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