openrewrite / rewrite-kotlin

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

Improve condition of nested inner class type fetching #548

Closed kunli2 closed 6 months ago

kunli2 commented 6 months ago

To address the comment in this PR. I'm concerned that the conditions here may not be very persuasive and conducive to understanding, so there should be an alternative condition of using PSI/FIR elements.

so instead of parts.size == 2 && psi.text == parts[0], I think the condition can be optimized to psi !is KtDotQualifiedExpression && psi == parent.receiverExpression