Skip to content

Commit 4fda583

Browse files
committed
Drop some more withPhase operations and replace with atPhase
1 parent 7b7e58d commit 4fda583

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

compiler/src/dotty/tools/dotc/transform/Bridges.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ class Bridges(root: ClassSymbol, thisPhase: DenotTransformer)(using Context) {
113113
*/
114114
def add(stats: List[untpd.Tree]): List[untpd.Tree] =
115115
val opc = new BridgesCursor()(using preErasureCtx)
116-
val ectx = ctx.withPhase(thisPhase)
117116
while opc.hasNext do
118117
if !opc.overriding.is(Deferred) then
119118
addBridgeIfNeeded(opc.overriding, opc.overridden)

compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ object ContextFunctionResults:
100100
* parameter count.
101101
*/
102102
def contextFunctionResultTypeCovering(meth: Symbol, paramCount: Int)(using Context) =
103-
inContext(ctx.withPhase(erasurePhase)) {
103+
atPhase(erasurePhase) {
104104
// Recursive instances return pairs of context types and the
105105
// # of parameters they represent.
106106
def missingCR(tp: Type, crCount: Int): (Type, Int) =

compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@ class ElimErasedValueType extends MiniPhase with InfoTransformer { thisPhase =>
7878
* this phase, yet do not have matching types before erasure.
7979
*/
8080
private def checkNoClashes(root: Symbol)(using Context) = {
81-
val opc = new OverridingPairs.Cursor(root)(using ctx.withPhase(thisPhase)) {
82-
override def exclude(sym: Symbol) =
83-
!sym.is(Method) || sym.is(Bridge) || super.exclude(sym)
84-
override def matches(sym1: Symbol, sym2: Symbol) =
85-
sym1.signature == sym2.signature
81+
val opc = atPhase(thisPhase) {
82+
new OverridingPairs.Cursor(root) {
83+
override def exclude(sym: Symbol) =
84+
!sym.is(Method) || sym.is(Bridge) || super.exclude(sym)
85+
override def matches(sym1: Symbol, sym2: Symbol) =
86+
sym1.signature == sym2.signature
87+
}
8688
}
8789

8890
def checkNoConflict(sym1: Symbol, sym2: Symbol, info: Type)(using Context): Unit = {

0 commit comments

Comments
 (0)