Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KT] Fix the logic the get the constant value of a field in preparati…
…on of migrating to Kotlin 2.0.21. Kotlin 2.0.21 will erroneously resolved public static final fields from java as const val property breaking our current logic to determine if the a field is a compile time constant field. This has an impact on RTA and transitively to the J2CL minifier. References to these field won't be tracked by RTA and the J2CL minifier will remove the code for the field's getter and possibly the clinit of the enclosing class. This will break our kotlinjavainterop integration test when it runs in uncompiled mode. The extra logic for retrieving the constant value is intended to target only fields defined in Kotlin, so it's safe to simply test whether the field originates from Java code. Links to the Kotlin bug: https://youtrack.jetbrains.com/issue/KT-72960 PiperOrigin-RevId: 694479053
- Loading branch information