[FIR] Drop ImplicitReceiverValue.expandedType

This field cached expansion of type of implicit receiver, which is incorrect,
  because type of receiver may change because of smartcasts, but this field
  was immutable
This commit is contained in:
Dmitriy Novozhilov
2023-06-02 11:29:24 +03:00
committed by Space Team
parent c55ddab1bf
commit b564260a33
2 changed files with 2 additions and 4 deletions
@@ -276,7 +276,7 @@ class FirTowerDataElement(
}
private fun ImplicitReceiverValue<*>.getImplicitScope(): FirScope {
return when (expandedType) {
return when (type.fullyExpandedType(useSiteSession)) {
is ConeErrorType,
is ConeStubType -> FirTypeScope.Empty
else -> implicitScope ?: error("Scope for type ${type::class.simpleName} is null.")