11package dotty .tools .dotc .interactive
22
3+ import java .nio .charset .Charset
4+
35import dotty .tools .dotc .ast .Trees ._
46import dotty .tools .dotc .config .Printers .interactiv
57import dotty .tools .dotc .core .Contexts .{Context , NoContext }
@@ -10,13 +12,13 @@ import dotty.tools.dotc.core.Flags._
1012import dotty .tools .dotc .core .Names .{Name , TermName }
1113import dotty .tools .dotc .core .NameKinds .SimpleNameKind
1214import dotty .tools .dotc .core .NameOps .NameDecorator
13- import dotty .tools .dotc .core .Symbols .{defn , NoSymbol , Symbol }
15+ import dotty .tools .dotc .core .Symbols .{NoSymbol , Symbol , defn }
1416import dotty .tools .dotc .core .Scopes
1517import dotty .tools .dotc .core .StdNames .{nme , tpnme }
1618import dotty .tools .dotc .core .TypeError
17- import dotty .tools .dotc .core .Types .{NameFilter , NamedType , Type , NoType }
19+ import dotty .tools .dotc .core .Types .{NameFilter , NamedType , NoType , Type }
1820import dotty .tools .dotc .printing .Texts ._
19- import dotty .tools .dotc .util .{NoSourcePosition , SourcePosition }
21+ import dotty .tools .dotc .util .{NameTransformer , NoSourcePosition , SourcePosition }
2022
2123import scala .collection .mutable
2224
@@ -150,8 +152,7 @@ object Completion {
150152 nameToSymbols.map { case (name, symbols) =>
151153 val typesFirst = symbols.sortWith((s1, s2) => s1.isType && ! s2.isType)
152154 val desc = description(typesFirst)
153- val strName = name.toString
154- val label = if (strName == " $u2192" ) " →" else strName // TODO fix name.decode and use it
155+ val label = NameTransformer .decodeIllegalChars(name.toString)
155156 Completion (label, desc, typesFirst)
156157 }
157158 }
0 commit comments