Status Update
Comments
al...@google.com <al...@google.com> #2
Moving to Android Studio component for triage to Lint.
va...@google.com <va...@google.com>
tn...@google.com <tn...@google.com> #3
Jinseong, what's the status of getting reified elements to show up in UAST? (In this test case, this is happening because the UAST for the method only has the regular and inlined calls.)
js...@google.com <js...@google.com> #4
what's the status of getting reified elements to show up in UAST?
If you're asking
For example,
(In this test case, this is happening because the UAST for the method only has the regular and inlined calls.)
Not really. This is happening because Lint's annotation retrieval for such reified elements is going too deeper to IJ util...
js...@google.com <js...@google.com>
a....@gmail.com <a....@gmail.com> #5
js...@google.com <js...@google.com> #6
It looks like the fix would be in LadyBug.1 / AGP 8.7.0-alpha01. If it missed the cut, should be in the very next one, alpha02.
an...@google.com <an...@google.com> #7
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug | 2024.1.3 Canary 1
- Android Gradle Plugin 8.7.0-alpha01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Version used: 1.3.0
Devices/Android versions reproduced on: --
I don't know if it is a bug or improvement in the library. I am trying to use `@CheckResult` annotation to mark that result of my inline function should not be ignored. However, neither lint nor Android Studio warns when result of inline function with reified generic is unused.
```
class Example {
@CheckResult
fun regular(): Int = 1
@CheckResult
inline fun inlined(crossinline block: () -> Int) = block()
@CheckResult
inline fun <reified T : Any> reified(crossinline block: () -> T): String {
val t = block()
return t::class.java.simpleName
}
// usage example
fun call() {
val a = Example()
a.regular() // warns
a.inlined { 1 } // warns
a.reified { 1 } // no warning
}
}
```
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue: [here](