So, I have these extension functions ```@file:Jvm...
# announcements
j
So, I have these extension functions
Copy code
@file:JvmName("UriDeepLinkFactory")
...
fun UriDeepLink.Companion.from(uri: Uri): UriDeepLink {
    return UriDeepLink(UriParameter(uri)) { scheme -> Schemes.valueOf(scheme) }
}
fun UriDeepLink.Companion.from(uriString: String): UriDeepLink {
    return UriDeepLink.from(Uri.parse(uriString))
}
But when I try to access it from java I get the error at compile time
Copy code
final UriDeepLink deepLink = UriDeepLinkFactory.from(operationDeepLink);
                                                       ^
    method UriDeepLinkFactory.from(Companion,Uri) is not applicable
      (actual and formal argument lists differ in length)
    method UriDeepLinkFactory.from(Companion,String) is not applicable
      (actual and formal argument lists differ in length)
Any idea of how to fix it ?
r
Well, the problem is that your function is an extension to Companion, so in Java it needs it as it's first parameter Afaik https://kotlinlang.org/docs/java-to-kotlin-interop.html#static-methods this should help Not sure if it works on extensions too, but try it