Looking at twitter post above, is there a list of ...
# announcements
m
Looking at twitter post above, is there a list of things that get "magically inlined" or is that documented somewhere? For example, I would never consider using
.indices
just because it would create additional objects for very slightly better syntax. However, it appears that it does NOT create any new objects, but I cannot find any documentation about that.
c
I'm not sure but it appears almost everything relating to
IntRange
in
for
loops get that treatment 🤔
(I'm assuming you know about the
inline
keyword) In IDEA, you can go to Tools → Kotlin → Show Kotlin Bytecode, click on your file, then in the Bytecode panel click ‘Decompile'. That will give you approximate Java code of your Kotlin code, so you can see what becomes what
Not sure if there are any similar tools for other platforms
m
yeah I know I can check via show kotlin bytecode, but it is really not feasible to check for every single method to see if it inlines or not