Convert interface (java) to fun interface (kotlin)

If the programmer forgot to write @FunctionalInterface, java code is converted to interface, even if it only has 1 method. I think if an interface (java) has only 1 method it should be converted to fun interface (kotlin).

What case do you mean exactly? Kotlin doesn’t require @FunctionalInterface in order to use SAM conversions. You can use any interface with a single abstract method as a function.

I’m talking about converting code from Java to Kotlin (intellij idea).

1 Like