[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:
+1
-1
@@ -18,7 +18,7 @@ import org.jetbrains.kotlin.test.services.assertions
|
||||
|
||||
abstract class AbstractCompileTimeConstantEvaluatorTest : AbstractAnalysisApiSingleFileTest() {
|
||||
override fun doTestByFileStructure(ktFile: KtFile, module: TestModule, testServices: TestServices) {
|
||||
val element = testServices.expressionMarkerProvider.getSelectedElement(ktFile)
|
||||
val element = testServices.expressionMarkerProvider.getSelectedElementOfTypeByDirective(ktFile, module)
|
||||
val expression = when (element) {
|
||||
is KtExpression -> element
|
||||
is KtValueArgument -> element.getArgumentExpression()
|
||||
|
||||
Reference in New Issue
Block a user