[kotlin-analysis] light elements for decompiled declaration should return original...
authorTagir Valeev <Tagir.Valeev@jetbrains.com>
Mon, 17 Jan 2022 05:21:37 +0000 (12:21 +0700)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Mon, 17 Jan 2022 06:56:46 +0000 (06:56 +0000)
commit88346c7cec907f18aa20ad79b38e45ad46e50c0c
tree53957dcb1321e816f1bba024b47366ecc9bcc5a3
parentf4d6b519a11fba6167747b07c2a068fa6162cc9a
[kotlin-analysis] light elements for decompiled declaration should return original Cls-elements

Otherwise, com.intellij.psi.util.PsiUtil.preferCompiledElement works incorrectly
As a result, Java bytecode inference doesn't start for Kotlin-compiled classes when Kotlin plugin is available
Fixes IDEA-286315 not correct warning about NullPointerException

GitOrigin-RevId: 853cb5bd5fe12b688f859e4444fbbf06ec1dea50
plugins/kotlin/analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/decompiledDeclarations/KtLightMethodForDecompiledDeclaration.kt