[AA] Handle KtTypeReference children in CompileTimeConstantProvider

CompileTimeConstantProvider could receive a reference expression,
whose grandparent is KtTypeReference (seen that in UAST inspection).
FIR would not contain anything explicit for this reference,
FirResolvedTypeRef would be received as the nearest parent.
Of course, in this case, there could be no compile time constant anyway.
This commit is contained in:
Anna Kozlova
2023-06-14 14:09:53 +02:00
committed by Space Team
parent 455aa4a76a
commit f80ed4592d
8 changed files with 42 additions and 1 deletions
@@ -0,0 +1,6 @@
// LOOK_UP_FOR_ELEMENT_OF_TYPE: KtNameReferenceExpression
class Test {
fun box(t : Test?) {
val inst = t is <expr>Test</expr>
}
}
@@ -0,0 +1,9 @@
expression: Test
CONSTANT_EXPRESSION_EVALUATION
constant: NOT_EVALUATED
constantValueKind: NOT_EVALUATED
CONSTANT_LIKE_EXPRESSION_EVALUATION
constantLike: NOT_EVALUATED
constantLikeValueKind: NOT_EVALUATED