Skip to content

Commit de6bf43

Browse files
committed
Tweaks in wording of error messages
1 parent 1975856 commit de6bf43

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,8 +2591,8 @@ object TypeComparer {
25912591
def addLow: Repr = approx | LoApprox
25922592
def addHigh: Repr = approx | HiApprox
25932593
def show: String =
2594-
val lo = if low then " (left is tightened)" else ""
2595-
val hi = if high then " (right is tigthened)" else ""
2594+
val lo = if low then " (left is approximated)" else ""
2595+
val hi = if high then " (right is approximated)" else ""
25962596
lo ++ hi
25972597
end ApproxState
25982598
type ApproxState = ApproxState.Repr

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ object ErrorReporting {
128128
val c = ctx.typerState.constraint
129129
val constraintText =
130130
if c.domainLambdas.isEmpty then
131-
"empty constraint"
131+
"the empty constraint"
132132
else
133-
i"""following constraint:
133+
i"""a constraint with:
134134
|${c.contentsToString}"""
135135
i"""
136136
|${TypeComparer.explained(_.isSubType(found, expected), header)}
137137
|
138-
|The tests were made under the $constraintText"""
138+
|The tests were made under $constraintText"""
139139

140140
/** Format `raw` implicitNotFound or implicitAmbiguous argument, replacing
141141
* all occurrences of `${X}` where `X` is in `paramNames` with the

0 commit comments

Comments
 (0)