Skip to content

Commit 15670a8

Browse files
committed
Fix extractor for Select
1 parent 652afc0 commit 15670a8

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

compiler/src/dotty/tools/dotc/tasty/Toolbox.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package dotty.tools.dotc.tasty
22

3-
import dotty.tools.dotc.core.Contexts.Context
4-
53
import scala.reflect.ClassTag
64
import scala.tasty.constants.Constant
75
import scala.tasty.modifiers.Modifier
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package dotty.tools.dotc.tasty.internal
2+
3+
import dotty.tools.dotc.core.{NameKinds, Names}
4+
5+
import scala.tasty.names
6+
7+
object PossiblySignedName {
8+
9+
def apply(name: Names.TermName): names.PossiblySignedName =
10+
if (name.is(NameKinds.SignedName)) SignedName(name)
11+
else TermName(name)
12+
13+
}

compiler/src/dotty/tools/dotc/tasty/internal/Term.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object Term {
2525
def unapplySelect(arg: Impl): Option[trees.Select.Data] = arg.tree match {
2626
case id@Trees.Select(qual, name: Names.TermName) if id.isTerm =>
2727
implicit val ctx: Context = arg.ctx
28-
Some(Term(qual), TermName(name)) // FIXME PossiblySignedName
28+
Some(Term(qual), PossiblySignedName(name))
2929
case _ => None
3030
}
3131

0 commit comments

Comments
 (0)