Skip to content

Commit 89ad21b

Browse files
committed
Use IFT in Interactive#localize
1 parent e9838a2 commit 89ad21b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/interactive/Interactive.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,16 +379,16 @@ object Interactive {
379379
*/
380380
def localize(symbol: Symbol, sourceDriver: InteractiveDriver, targetDriver: InteractiveDriver): Symbol = {
381381

382-
def in[T](driver: InteractiveDriver)(fn: Context => T): T =
383-
fn(driver.currentCtx)
382+
def in[T](driver: InteractiveDriver)(fn: given Context => T): T =
383+
fn given driver.currentCtx
384384

385385
if (sourceDriver == targetDriver) symbol
386386
else {
387-
val owners = in(sourceDriver) { implicit ctx =>
387+
val owners = in(sourceDriver) {
388388
symbol.ownersIterator.toList.reverse.map(_.name)
389389
}
390-
in(targetDriver) { implicit ctx =>
391-
val base: Symbol = ctx.definitions.RootClass
390+
in(targetDriver) {
391+
val base: Symbol = defn.RootClass
392392
owners.tail.foldLeft(base) { (prefix, symbolName) =>
393393
if (prefix.exists) prefix.info.member(symbolName).symbol
394394
else NoSymbol

0 commit comments

Comments
 (0)