Skip to content

Commit 9dc23b8

Browse files
committed
Make tasty.Symbol comparable with equals
1 parent 012cb93 commit 9dc23b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import scala.tasty.names
99
object TastySymbol {
1010

1111
def apply(sym: Symbol)(implicit ctx: Context): scala.tasty.Symbol =
12-
if (sym.exists) new Impl(sym, ctx) else scala.tasty.NoSymbol
12+
if (sym.exists) Impl(sym)(ctx) else scala.tasty.NoSymbol
1313

14-
private class Impl(sym: Symbol, ctx: Context) extends scala.tasty.Symbol { self =>
14+
private case class Impl(sym: Symbol)(ctx: Context) extends scala.tasty.Symbol { self =>
1515

1616
override def name: names.Name = Name(sym.name(ctx))
1717

0 commit comments

Comments
 (0)