Closed Edward608 closed 7 years ago
For now the only/best way is to surround function with @TargetApi(..)
annotation:
@TargetApi(26)
fun foo() {
fromApi(26) { /* ... */ }
}
whereas in the call site... I would disable this inpection in IDE:
Hope it will be fixed after better kotlin support.
It is quite annoying to see those unnecessary warnings in the call site of these two inline functions, since the api level check is already done.