Roman
01/09/2024, 10:21 AMjava: cannot access org.jetbrains.kotlin.fir.expressions.impl.FirElseIfTrueCondition
bad class file: /.../kotlin-compiler-2.0.0-Beta2.jar!/org/jetbrains/kotlin/fir/expressions/impl/FirElseIfTrueCondition.class
undeclared type variable: T
Please remove or make sure it appears in the correct subdirectory of the classpath.
Is there any other way I can check for "else" branch using K2 API?dmitriy.novozhilov
01/09/2024, 10:28 AMRoman
01/09/2024, 10:39 AMdmitriy.novozhilov
01/09/2024, 11:03 AMdmitriy.novozhilov
01/09/2024, 11:08 AMRoman
01/09/2024, 12:16 PMelement.getSource() == null
in this particular case? As a temporary solution.dmitriy.novozhilov
01/09/2024, 12:19 PMSo looks like the best way is to use K2 API from Kotlin rather than from Java, right?Yes, it's better to use it from Kotlin
What about checking forin this particular case? As a temporary solution.element.getSource() == null
source
is not reliable source of information
If you really want to stick with java you can use smth like that:
element.class.getName().equals("FirElseIfTrueCondition")
Roman
01/09/2024, 12:27 PM