Any reason why one is marked as a function and the...
# announcements
j
Any reason why one is marked as a function and the other one is a method?
m
Second one is an extension function, it’ll be compiled into a static method so I guess that’s the reason
👍 2
Check how it looks as a java code: Tools->Kotlin->Show bytecode and then tap Decompile button
j
its actually not compiled to a static method
but makes it into a parameter
m
Oh, probably because it’s not a top level extension but a member of MyClass. In this case my guess would be that extension functions are marked as functions?
j
it doesn't change anything 😛 But I just felt it was a bit weird looking at a class in the structure view where sometimes it was
f
and sometimes
m
.