File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -213,19 +213,19 @@ trait TypeAssigner {
213
213
else {
214
214
val alts = tpe.denot.alternatives.map(_.symbol).filter(_.exists)
215
215
var packageAccess = false
216
- val what = alts match {
216
+ val whatCanNot = alts match {
217
217
case Nil =>
218
- name.toString
218
+ em " $ name cannot "
219
219
case sym :: Nil =>
220
- if (sym.owner == pre.typeSymbol) sym.show else sym.showLocated
220
+ em " ${ if (sym.owner == pre.typeSymbol) sym.show else sym.showLocated} cannot "
221
221
case _ =>
222
- em " none of the overloaded alternatives named $name"
222
+ em " none of the overloaded alternatives named $name can "
223
223
}
224
224
val where = if (ctx.owner.exists) s " from ${ctx.owner.enclosingClass}" else " "
225
225
val whyNot = new StringBuffer
226
226
alts foreach (_.isAccessibleFrom(pre, superAccess, whyNot))
227
227
if (tpe.isError) tpe
228
- else errorType(ex " $what cannot be accessed as a member of $pre$where. $whyNot" , pos)
228
+ else errorType(ex " $whatCanNot be accessed as a member of $pre$where. $whyNot" , pos)
229
229
}
230
230
}
231
231
else ctx.makePackageObjPrefixExplicit(tpe withDenot d)
You can’t perform that action at this time.
0 commit comments