FIR LL: fix searching logic for enum entry

KtEnumEntry, a subtype of KtClass, has been handled by
findNonLocalClass. Since KtEnumEntry doesn't have class id, that util
always throws an error while retrieving class id.

Instead, we should use containing class (i.e., enum class) id.
Also, once the enum class is resolved, we should search for matching
enum entry inside the enum class.
This commit is contained in:
Jinseong Jeon
2021-11-09 22:01:46 -08:00
committed by Roman Golyshev
parent 140b8d6ddf
commit cf886c5975
5 changed files with 29 additions and 4 deletions
@@ -0,0 +1,2 @@
@Retention(AnnotationRetention.<expr>SOURCE</expr>)
annotation class Anno
@@ -0,0 +1,5 @@
KT element: KtNameReferenceExpression
FIR element: FirResolvedNamedReferenceImpl
FIR element rendered:
R|kotlin/annotation/AnnotationRetention.SOURCE|