Kotlin extension function wrong byte code generated

123 views Asked by At

Below snippet breaks compilation due to: Back-end (JVM) Internal error: wrong bytecode generated : no bytecode

inline fun <reified T : Observable> T?.onPropertyChanged(d: CompositeDisposable? = null, crossinline callback: (T) -> Unit) = this?.run { blabla }

However, It works as expected If I stop inline and reified.

Important note: This problem only occurs when inline extension published to aar, with local usage no problem at all.

Just curious about why it happens, Thanks in advance.

0

There are 0 answers