Fix ISE when inferring type of a property that delegates to itself

^KT-37796 Fixed
This commit is contained in:
Denis.Zharkov
2020-12-23 18:32:14 +03:00
parent cbb8459e4e
commit 1a03d5c93e
7 changed files with 36 additions and 3 deletions
@@ -545,7 +545,12 @@ class DelegatedPropertyResolver(
traceToResolveDelegatedProperty, false, delegateExpression, ContextDependency.DEPENDENT
)
var delegateType = delegateTypeInfo.type ?: return null
if (delegateTypeInfo.type == null) {
traceToResolveDelegatedProperty.commit()
return null
}
var delegateType = delegateTypeInfo.type
var delegateDataFlow = delegateTypeInfo.dataFlowInfo
val delegateTypeConstructor = delegateType.constructor