Skip to content

Commit 45c2621

Browse files
committed
Drop skipCapturing in isRef
1 parent f830274 commit 45c2621

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,24 +191,22 @@ object Types {
191191
* It makes no sense for it to be an alias type because isRef would always
192192
* return false in that case.
193193
*/
194-
def isRef(sym: Symbol, skipRefined: Boolean = true, skipCapturing: Boolean = false)(using Context): Boolean = this match {
194+
def isRef(sym: Symbol, skipRefined: Boolean = true)(using Context): Boolean = this match {
195195
case this1: TypeRef =>
196196
this1.info match { // see comment in Namer#typeDefSig
197-
case TypeAlias(tp) => tp.isRef(sym, skipRefined, skipCapturing)
197+
case TypeAlias(tp) => tp.isRef(sym, skipRefined)
198198
case _ => this1.symbol eq sym
199199
}
200200
case this1: RefinedOrRecType if skipRefined =>
201-
this1.parent.isRef(sym, skipRefined, skipCapturing)
201+
this1.parent.isRef(sym, skipRefined)
202202
case this1: AppliedType =>
203203
val this2 = this1.dealias
204-
if (this2 ne this1) this2.isRef(sym, skipRefined, skipCapturing)
205-
else this1.underlying.isRef(sym, skipRefined, skipCapturing)
204+
if (this2 ne this1) this2.isRef(sym, skipRefined)
205+
else this1.underlying.isRef(sym, skipRefined)
206206
case this1: TypeVar =>
207-
this1.instanceOpt.isRef(sym, skipRefined, skipCapturing)
207+
this1.instanceOpt.isRef(sym, skipRefined)
208208
case this1: AnnotatedType =>
209-
this1.parent.isRef(sym, skipRefined, skipCapturing)
210-
case this1: CapturingType if skipCapturing =>
211-
this1.parent.isRef(sym, skipRefined, skipCapturing)
209+
this1.parent.isRef(sym, skipRefined)
212210
case _ => false
213211
}
214212

0 commit comments

Comments
 (0)