openrewrite / rewrite-kotlin

Work-in-progress implementation of Kotlin language support for OpenRewrite.
Apache License 2.0
38 stars 12 forks source link

Suppress annotations can be assigned the wrong type #488

Closed traceyyoshima closed 7 months ago

traceyyoshima commented 7 months ago

TODO:

The misattribution depends on the position of the annotation, in some cases, when the PSI climbs parent trees the parent will not resolve to a type.

val releaseDates: List< /*C0*/ @Suppress  /*C1*/ String> = emptyList()
traceyyoshima commented 7 months ago

Update: This is generally applicable, other case of incorrect type: AnnotationTest#annotatedTypeParameter

traceyyoshima commented 7 months ago

Placing in the backlog until PRs for type fixes have been merged. It's challenging to identify the remaining issues without the current fixes.

traceyyoshima commented 7 months ago

Fixed by: https://github.com/openrewrite/rewrite-kotlin/commit/370f2b46511dbb128c11e92b17d8f97ec0c16030