Kotlin / binary-compatibility-validator

Public API management tool
Apache License 2.0
803 stars 59 forks source link

Filter out `$suspendImpl` functions declared in interfaces #270

Open fzhinkin opened 2 hours ago

fzhinkin commented 2 hours ago

On JVM, the compiler generates special <original function name>$suspendImpl methods for every open suspendable function. For classes, these methods are package private and are never included in dump. For interfaces, however, such functions could only be either private (but we need to call them outside the interface, so that doesn't work), or public (we are here now). So, these public functions do not constitute the public ABI and are public only due to restrictions imposed on class files.

BCV should filter these methods out of generated dumps.

fzhinkin commented 2 hours ago

See https://github.com/Kotlin/kotlinx.coroutines/pull/4244 for example of a dump with $suspendImpl functions.