eygraber
04/19/2022, 9:12 PMLandry Norris
04/19/2022, 9:36 PMGleb Minaev
04/20/2022, 5:15 PMnoinline
, which is the same) nor type parameter to reify.
3. All IntelliJ IDEA warnings about inling are inherited from Kotlin compiler. (Don't know about other IDEs' warnings.)
Also there is advise not to apply inlining to functions with large bodies (otherwise, their large bodies will be inlined in every place they are used in, so size of generated bytecode will increase rapidly).
All of the three advises should be written in docs. But as I can see, it is a bit implicit. But it's described very good in book Kotlin in Action.
Also there is case of common sense. For example, if you have very simple function like
fun process(a: A, b: Int) = TODO()
fun A.process() = process(this, 15)
then it's better to inline seccomd function, and the code will be a very bit faster, because there are less links to use.