Skip to content

Commit a356142

Browse files
committed
Remove implicit definitions of ctx that are not parameters
1 parent 7330e7f commit a356142

35 files changed

+119
-224
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import dotty.tools.dotc.core.Symbols._
1010
* the compiler cake (Global).
1111
*/
1212
final class BCodeAsmCommon[I <: DottyBackendInterface](val interface: I) {
13-
import interface._
13+
import interface.{_, given _}
1414
import DottyBackendInterface.symExtensions
1515

1616
/**

compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
3030
// import global._
3131
// import definitions._
3232
import tpd._
33-
import int._
33+
import int.{_, given _}
3434
import DottyBackendInterface.symExtensions
3535
import bTypes._
3636
import coreBTypes._

compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
4545
import bTypes._
4646
import tpd._
4747
import coreBTypes._
48-
import int._
48+
import int.{_, given _}
4949
import DottyBackendInterface._
5050

5151
def ScalaATTRName: String = "Scala"
@@ -360,7 +360,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
360360
val narg = normalizeArgument(arg)
361361
// Transformation phases are not run on annotation trees, so we need to run
362362
// `constToLiteral` at this point.
363-
val t = constToLiteral(narg)(ctx.withPhase(ctx.erasurePhase))
363+
val t = constToLiteral(narg)(using ctx.withPhase(ctx.erasurePhase))
364364
t match {
365365
case Literal(const @ Constant(_)) =>
366366
const.tag match {
@@ -464,7 +464,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
464464
} // end of trait BCAnnotGen
465465

466466
trait BCJGenSigGen {
467-
import int._
467+
import int.{_, given _}
468468

469469
def getCurrentCUnit(): CompilationUnit
470470

compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ trait BCodeIdiomatic {
1919
val int: DottyBackendInterface
2020
final lazy val bTypes = new BTypesFromSymbols[int.type](int)
2121

22-
import int._
22+
import int.{_, given _}
2323
import bTypes._
2424
import coreBTypes._
2525

compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import dotty.tools.dotc.util.Spans._
2626
*
2727
*/
2828
trait BCodeSkelBuilder extends BCodeHelpers {
29-
import int._
29+
import int.{_, given _}
3030
import DottyBackendInterface.{symExtensions, _}
3131
import tpd._
3232
import bTypes._

compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import dotty.tools.dotc.ast.tpd.TreeOps
1818
*
1919
*/
2020
trait BCodeSyncAndTry extends BCodeBodyBuilder {
21-
import int._
21+
import int.{_, given _}
2222
import tpd._
2323
import bTypes._
2424
import coreBTypes._

compiler/src/dotty/tools/backend/jvm/BTypes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import scala.tools.asm
1515
abstract class BTypes {
1616

1717
val int: DottyBackendInterface
18-
import int._
18+
import int.{_, given _}
1919
/**
2020
* A map from internal names to ClassBTypes. Every ClassBType is added to this map on its
2121
* construction.

compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import dotty.tools.dotc.util.WeakHashSet
2727
* not have access to the compiler instance.
2828
*/
2929
class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
30-
import int._
30+
import int.{_, given _}
3131
import DottyBackendInterface.{symExtensions, _}
3232

3333
lazy val TransientAttr = requiredClass[scala.transient]

compiler/src/dotty/tools/backend/jvm/BytecodeWriters.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class FileConflictException(msg: String, val file: AbstractFile) extends IOExcep
1616
*/
1717
trait BytecodeWriters {
1818
val int: DottyBackendInterface
19-
import int._
19+
import int.{_, given _}
2020

2121
/**
2222
* @param clsName cls.getName

compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import dotty.tools.dotc.transform.Erasure
3333
*/
3434
class CoreBTypes[BTFS <: BTypesFromSymbols[_ <: DottyBackendInterface]](val bTypes: BTFS) {
3535
import bTypes._
36-
import int._
36+
import int.{_, given _}
3737
import DottyBackendInterface._
3838

3939
//import global._

0 commit comments

Comments
 (0)