Skip to content

Commit 6d6c409

Browse files
committed
Drop isTightPrefix
1 parent 4b476c9 commit 6d6c409

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -248,19 +248,6 @@ object Types {
248248
val d = defn
249249
hasClassSymbol(d.NothingClass) || hasClassSymbol(d.NullClass)
250250

251-
/** Does this type refer exactly to class symbol `sym`, instead of to a subclass of `sym`?
252-
* Implemented like `isRef`, but follows more types: all type proxies as well as and- and or-types
253-
*/
254-
private[Types] def isTightPrefix(sym: Symbol)(using Context): Boolean = stripTypeVar match {
255-
case tp: NamedType => tp.info.isTightPrefix(sym)
256-
case tp: ClassInfo => tp.cls eq sym
257-
case tp: Types.ThisType => tp.cls eq sym
258-
case tp: TypeProxy => tp.superType.isTightPrefix(sym)
259-
case tp: AndType => tp.tp1.isTightPrefix(sym) && tp.tp2.isTightPrefix(sym)
260-
case tp: OrType => tp.tp1.isTightPrefix(sym) || tp.tp2.isTightPrefix(sym)
261-
case _ => false
262-
}
263-
264251
/** True if this type is an instance of the given `cls` or an instance of
265252
* a non-bottom subclass of `cls`.
266253
*/

0 commit comments

Comments
 (0)