If I define a function outside a class and want to...
# getting-started
d
If I define a function outside a class and want to access it with reflection, under which 'class' do I find it?
t
I think it's just a static function in a anomalous class someplace.
it's not associated w/ the class it's extending, at least not from a reflection POV
I think you'd have to search all static function that take the class you extended as the first param.
although, I'm not 100% sure about that.
e
unless overridden with
@file:JvmName
, top-level functions and properties are compiled into a class named after the filename plus "kt", see https://kotlinlang.org/docs/java-to-kotlin-interop.html#package-level-functions