File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ object Trees {
174
174
def toList : List [Tree [T ]] = this :: Nil
175
175
176
176
/** if this tree is the empty tree, the alternative, else this tree */
177
- def orElse [U >: Untyped <: T ](that : => Tree [U ]): Tree [U ] =
177
+ inline def orElse [U >: Untyped <: T ](inline that : Tree [U ]): Tree [U ] =
178
178
if (this eq genericEmptyTree) that else this
179
179
180
180
/** The number of nodes in this tree */
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ object Denotations {
237
237
def mapInfo (f : Type => Type )(using Context ): Denotation
238
238
239
239
/** If this denotation does not exist, fallback to alternative */
240
- final def orElse (that : => Denotation ): Denotation = if (this .exists) this else that
240
+ inline def orElse (inline that : Denotation ): Denotation = if (this .exists) this else that
241
241
242
242
/** The set of alternative single-denotations making up this denotation */
243
243
final def alternatives : List [SingleDenotation ] = altsWith(alwaysTrue)
@@ -596,7 +596,7 @@ object Denotations {
596
596
def mapInfo (f : Type => Type )(using Context ): SingleDenotation =
597
597
derivedSingleDenotation(symbol, f(info))
598
598
599
- def orElse (that : => SingleDenotation ): SingleDenotation = if (this .exists) this else that
599
+ inline def orElse (inline that : SingleDenotation ): SingleDenotation = if (this .exists) this else that
600
600
601
601
def altsWith (p : Symbol => Boolean ): List [SingleDenotation ] =
602
602
if (exists && p(symbol)) this :: Nil else Nil
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ object Symbols {
239
239
}
240
240
241
241
/** This symbol, if it exists, otherwise the result of evaluating `that` */
242
- def orElse (that : => Symbol )(using Context ): Symbol =
242
+ inline def orElse (inline that : Symbol )(using Context ): Symbol =
243
243
if (this .exists) this else that
244
244
245
245
/** If this symbol satisfies predicate `p` this symbol, otherwise `NoSymbol` */
You can’t perform that action at this time.
0 commit comments