openrewrite / rewrite-kotlin

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

Type mapping issue: anonymous classes and functions do not have a unique name #531

Open traceyyoshima opened 9 months ago

traceyyoshima commented 9 months ago

In Java, anonymous classes and methods are given a unique name $1, $2, etc. In Kotlin, the elements have the same name, <anonymous>. The non-unique name means that the same signature will be generated for anonymous classes or functions of the same type, leading to incorrect type attribution.