[FIR] Create snapshot of tower data context for postponed callable referneces
This fixes an issue if type of some implicit receiver was changed because of changed smartcast in outer scope ^KT-51228 Fixed
This commit is contained in:
@@ -101,8 +101,8 @@ sealed class ImplicitReceiverValue<S : FirBasedSymbol<*>>(
|
||||
* Should be called only in ImplicitReceiverStack
|
||||
*/
|
||||
fun replaceType(type: ConeKotlinType) {
|
||||
if (!mutable) throw IllegalStateException("Cannot mutate an immutable ImplicitReceiverValue")
|
||||
if (type == this.type) return
|
||||
if (!mutable) throw IllegalStateException("Cannot mutate an immutable ImplicitReceiverValue")
|
||||
this.type = type
|
||||
receiverExpression = if (type == originalReceiverExpression.typeRef.coneType) {
|
||||
originalReceiverExpression
|
||||
|
||||
Reference in New Issue
Block a user