icerockdev / moko-kswift

Swift-friendly api generator for Kotlin/Native frameworks
https://moko.icerock.dev
Apache License 2.0
351 stars 21 forks source link

Generate extensions over extension methods for Companion object #31

Closed jeantuffier closed 2 years ago

jeantuffier commented 2 years ago

It seems like no swift code is generated for this function :

fun CostAttributes.Companion.fromDailyEntries(
    today: DailyEntries,
    yesterday: DailyEntries? = null,
    now: String = Clock.System.now().toString()
) = ...

Same things with many other extensions on other companion objects I have

Alex009 commented 2 years ago

hi! as i see Kotlin/Native successful generate extensions for companion without any additions.

i test on:

class SomeClass {
    companion object
}

fun SomeClass.Companion.extensionOnCompanion() = Unit

fun SomeClass.extensionOnKotlinClass() = Unit

fun IntProgression.Companion.extensionOnKotlinCompanion() = Unit

in all cases i got extensions already available in SomeClass, SomeClass.Companion, IntProgression.Companion api.

jeantuffier commented 2 years ago

Alright, I need to check again and report what I found.