Skip to content

Commit 3083140

Browse files
committed
Drop more occurrences
1 parent 1485357 commit 3083140

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ trait ImportSuggestions:
105105
case ref: TermRef => rootsIn(ref) ::: rootsOnPath(ref.prefix)
106106
case _ => Nil
107107

108-
def recur(using ctx: Context): List[TermRef] =
108+
def recur(using Context): List[TermRef] =
109109
if ctx.owner.exists then
110110
val defined =
111111
if ctx.owner.isClass then
@@ -140,7 +140,7 @@ trait ImportSuggestions:
140140
* return instead a list of all possible references to extension methods named
141141
* `name` that are applicable to `T`.
142142
*/
143-
private def importSuggestions(pt: Type)(using ctx: Context): (List[TermRef], List[TermRef]) =
143+
private def importSuggestions(pt: Type)(using Context): (List[TermRef], List[TermRef]) =
144144
val timer = new Timer()
145145
val deadLine = System.currentTimeMillis() + suggestImplicitTimeOut
146146

@@ -241,7 +241,7 @@ trait ImportSuggestions:
241241
* The addendum suggests given imports that might fix the problem.
242242
* If there's nothing to suggest, an empty string is returned.
243243
*/
244-
override def importSuggestionAddendum(pt: Type)(using ctx: Context): String =
244+
override def importSuggestionAddendum(pt: Type)(using Context): String =
245245
val (fullMatches, headMatches) =
246246
importSuggestions(pt)(using ctx.fresh.setExploreTyperState())
247247
implicits.println(i"suggestions for $pt in ${ctx.owner} = ($fullMatches%, %, $headMatches%, %)")

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ object Inliner {
178178
* where the call `f(x)` is inline-expanded. This body is then transferred
179179
* back to `f` at erasure, using method addRetainedInlineBodies.
180180
*/
181-
def bodyRetainer(mdef: DefDef)(using ctx: Context): DefDef =
181+
def bodyRetainer(mdef: DefDef)(using Context): DefDef =
182182
val meth = mdef.symbol.asTerm
183183

184184
val retainer = meth.copy(
@@ -264,7 +264,7 @@ object Inliner {
264264
private enum ErrorKind:
265265
case Parser, Typer
266266

267-
private def compileForErrors(tree: Tree, stopAfterParser: Boolean)(using ctx: Context): List[(ErrorKind, Error)] =
267+
private def compileForErrors(tree: Tree, stopAfterParser: Boolean)(using Context): List[(ErrorKind, Error)] =
268268
assert(tree.symbol == defn.CompiletimeTesting_typeChecks || tree.symbol == defn.CompiletimeTesting_typeCheckErrors)
269269
def stripTyped(t: Tree): Tree = t match {
270270
case Typed(t2, _) => stripTyped(t2)
@@ -1220,7 +1220,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
12201220
override def newLikeThis: Typer = new InlineTyper(initialErrorCount)
12211221

12221222
/** Suppress further inlining if this inline typer has already issued errors */
1223-
override def suppressInline(using ctx: Context) =
1223+
override def suppressInline(using Context) =
12241224
ctx.reporter.errorCount > initialErrorCount || super.suppressInline
12251225
}
12261226

compiler/src/dotty/tools/dotc/typer/Namer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ class Namer { typer: Typer =>
272272
* The logic here is very subtle and fragile due to the fact that
273273
* we are not allowed to force anything.
274274
*/
275-
def checkNoConflict(name: Name, isPrivate: Boolean, span: Span)(using ctx: Context): Name =
275+
def checkNoConflict(name: Name, isPrivate: Boolean, span: Span)(using Context): Name =
276276
val owner = ctx.owner
277277
var conflictsDetected = false
278278

compiler/src/dotty/tools/dotc/typer/Nullables.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ object Nullables:
142142
/** The nullability context to be used after a case that matches pattern `pat`.
143143
* If `pat` is `null`, this will assert that the selector `sel` is not null afterwards.
144144
*/
145-
def afterPatternContext(sel: Tree, pat: Tree)(using ctx: Context) = (sel, pat) match
145+
def afterPatternContext(sel: Tree, pat: Tree)(using Context) = (sel, pat) match
146146
case (TrackedRef(ref), Literal(Constant(null))) => ctx.addNotNullRefs(Set(ref))
147147
case _ => ctx
148148

149149
/** The nullability context to be used for the guard and rhs of a case with
150150
* given pattern `pat`. If the pattern can only match non-null values, this
151151
* will assert that the selector `sel` is not null in these regions.
152152
*/
153-
def caseContext(sel: Tree, pat: Tree)(using ctx: Context): Context = sel match
153+
def caseContext(sel: Tree, pat: Tree)(using Context): Context = sel match
154154
case TrackedRef(ref) if matchesNotNull(pat) => ctx.addNotNullRefs(Set(ref))
155155
case _ => ctx
156156

@@ -462,7 +462,7 @@ object Nullables:
462462
* flow assumptions about mutable variables and suggest that it is enclosed
463463
* in a `byName(...)` call instead.
464464
*/
465-
def postProcessByNameArgs(fn: TermRef, app: Tree)(using ctx: Context): Tree =
465+
def postProcessByNameArgs(fn: TermRef, app: Tree)(using Context): Tree =
466466
fn.widen match
467467
case mt: MethodType
468468
if mt.paramInfos.exists(_.isInstanceOf[ExprType]) && !fn.symbol.is(Inline) =>

compiler/src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ object RefChecks {
874874
* surprising names at runtime. E.g. in neg/i4564a.scala, a private
875875
* case class `apply` method would have to be renamed to something else.
876876
*/
877-
def checkNoPrivateOverrides(tree: Tree)(using ctx: Context): Unit =
877+
def checkNoPrivateOverrides(tree: Tree)(using Context): Unit =
878878
val sym = tree.symbol
879879
if sym.owner.isClass
880880
&& sym.is(Private)

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3286,7 +3286,7 @@ class Typer extends Namer
32863286
}
32873287

32883288
// Overridden in InlineTyper
3289-
def suppressInline(using ctx: Context): Boolean = ctx.isAfterTyper
3289+
def suppressInline(using Context): Boolean = ctx.isAfterTyper
32903290

32913291
/** Does the "contextuality" of the method type `methType` match the one of the prototype `pt`?
32923292
* This is the case if

0 commit comments

Comments
 (0)