Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
za...@gmail.com <za...@gmail.com> #3
Great, thanks for the quick turnaround!
No update yet.
Great, thanks for the quick turnaround!
Description
Consider the following code snippet in a custom View
This snippet, when targeting android SDK 31, reports no errors because .
TypedArray
implementsAutoCloseable
and this uses Kotlin stdlib's top-levelkotlin.use
extension function on AutoCloseable. However, this seems to be a relatively new addition to the SDK. I actually can't find documentation that explicitly mentions when this was added, my best guess is that it was added in API 31 because that's when the correspondingclose()
method was addedThe above snippet will obviously then fail at runtime if running on SDK < 31, but thew NewApi lint gives no warnings or errors about it. I'm not entirely sure where it falls over as it's going through both an an inline extension function + a superinterface, but I figure that's a simple enough repro case.