[KAPT] Bring back properties resolution in light analysis

Because kapt fails on evaluation constant expressions of SomeType::class
This commit is contained in:
Andrey Zinovyev
2021-04-14 07:50:22 +00:00
committed by Space
parent 9bbfe5a7a2
commit 8c464b4de5
3 changed files with 18 additions and 6 deletions
@@ -85,12 +85,7 @@ open class PartialAnalysisHandlerExtension : AnalysisHandlerExtension {
if (declaration is KtProperty) {
/* TODO Now we analyse body with anonymous object initializers. Check if we can't avoid it
* val a: Runnable = object : Runnable { ... } */
//resolve property in case it has delegate expression or explicit accessor, otherwise just infer type
if (declaration.delegateExpression != null || declaration.accessors.isNotEmpty()) {
bodyResolver.resolveProperty(topDownAnalysisContext, declaration, descriptor)
} else {
BodyResolver.computeDeferredType(descriptor.returnType)
}
bodyResolver.resolveProperty(topDownAnalysisContext, declaration, descriptor)
}
}
is FunctionDescriptor -> {