Skip to content

Commit cc347b6

Browse files
committed
Fix dealiasing of types in mismatch error messages
1 parent a2ae90e commit cc347b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ class PlainPrinter(_ctx: Context) extends Printer {
193193
"<overloaded " ~ toTextRef(tp) ~ ">"
194194
case tp: TypeRef =>
195195
if (printWithoutPrefix.contains(tp.symbol))
196-
Str(selectionString(tp))
196+
selectionString(tp.dealias.typeSymbol.namedType)
197197
else
198-
toTextPrefixOf(tp) ~ selectionString(tp)
198+
toTextPrefixOf(tp) ~ selectionString(tp.dealias.typeSymbol.namedType)
199199
case tp: TermParamRef =>
200200
ParamRefNameString(tp) ~ lambdaHash(tp.binder) ~ ".type"
201201
case tp: TypeParamRef =>

0 commit comments

Comments
 (0)