Skip to content

Commit 633eb23

Browse files
committed
Inlined Type.isOrType
1 parent 9cb9455 commit 633eb23

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ object TypeOps:
165165
// corrective steps, so no widening is wanted.
166166
simplify(l, theMap) | simplify(r, theMap)
167167
else if r.isNothingType || (l eq r) then l
168-
else if l.isOrType || r.isOrType then tp.deduplicatedAbsorbingNothingTypes
168+
else if l.isInstanceOf[OrType] || r.isInstanceOf[OrType] then tp.deduplicatedAbsorbingNothingTypes
169169
else if l.isNothingType then r
170170
else mapOver
171171
case tp @ CapturingType(parent, refs) =>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,6 @@ object Types {
446446
final def containsWildcardTypes(using Context) =
447447
existsPart(_.isInstanceOf[WildcardType], StopAt.Static, forceLazy = false)
448448

449-
/** Is this a union type? */
450-
final def isOrType: Boolean = this.isInstanceOf[OrType]
451-
452449
// ----- Higher-order combinators -----------------------------------
453450

454451
/** Returns true if there is a part of this type that satisfies predicate `p`.

0 commit comments

Comments
 (0)