The documentation for @inline
states:
An annotation on methods that requests that the compiler should try especially hard to inline the annotated method.
However, unlike the similar @tailrec
annotation, the compiler does not (by default) offer any information about whether or not it managed to inline a method.
Is there any way to determine if the compiler managed to inline an annotated method?
Specifically, I'd like for the compiler to tell me, for example, that in all reasonable cases it will be able to inline a method I marked. (Some situtations I can think of where it would warn me that it cannot inline a method is if it is not final
, and hence requires a vtable lookup if the class is subclassed)
Related questions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With