openrewrite / rewrite-kotlin

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

Type issue: J.FieldAccess#type is set to null in visitUserType. #508

Closed traceyyoshima closed 9 months ago

traceyyoshima commented 9 months ago

Note: The type returned by type via PSI associations does not guarantee the correct type is returned.

The field access may be occurring on the part of a name like a.b from a.b.TypeName. The association will climb up the parent until the FIR element is resolved and return a type for PSI elements that should not be type attributed.