Skip to content

Commit 6137fd5

Browse files
committed
Make Type#orElse an inline method
1 parent 212b8af commit 6137fd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ object Types {
143143
final def exists: Boolean = this.ne(NoType)
144144

145145
/** This type, if it exists, otherwise `that` type */
146-
def orElse(that: => Type): Type = if (exists) this else that
146+
inline def orElse(inline that: => Type): Type = if (exists) this else that
147147

148148
/** Is this type a value type? */
149149
final def isValueType: Boolean = this.isInstanceOf[ValueType]

0 commit comments

Comments
 (0)