[ULC] Fix delegate field type resolve
Fixed #KT-46519
This commit is contained in:
committed by
TeamCityServer
parent
a02cecec20
commit
b0df70dbfe
@@ -114,9 +114,8 @@ internal open class KtUltraLightFieldImpl protected constructor(
|
|||||||
private val kotlinType: KotlinType?
|
private val kotlinType: KotlinType?
|
||||||
get() = when {
|
get() = when {
|
||||||
declaration is KtProperty && declaration.hasDelegate() ->
|
declaration is KtProperty && declaration.hasDelegate() ->
|
||||||
(variableDescriptor as? PropertyDescriptor)?.let {
|
declaration.delegateExpression?.let {
|
||||||
val context = LightClassGenerationSupport.getInstance(project).analyze(declaration)
|
LightClassGenerationSupport.getInstance(project).analyze(it).getType(it)
|
||||||
PropertyCodegen.getDelegateTypeForProperty(it, context)
|
|
||||||
}
|
}
|
||||||
declaration is KtObjectDeclaration ->
|
declaration is KtObjectDeclaration ->
|
||||||
(declaration.resolve() as? ClassDescriptor)?.defaultType
|
(declaration.resolve() as? ClassDescriptor)?.defaultType
|
||||||
|
|||||||
Reference in New Issue
Block a user