Does anybody know why there's a warning for inlini...
# announcements
p
Does anybody know why there's a warning for inlining functions that don't take lambda parameters? Such as
Copy code
inline operator fun Int?.plus(other: Int?) = if (this != null && other != null) {
    this + other
} else {
    null
}
Let's say I want to use this in places that are called millions of times per second. Wouldn't the
inline
modifier improve performance there as well?
k
The JVM will most likely inline your call anyway, if it thinks it can profit from doing so. So the expected profit is most likely very small.
p
Good to know, thank you