File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
compiler/frontend/src/org/jetbrains/kotlin/resolve/calls Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,6 @@ public Boolean invoke(KtSimpleNameExpression nameExpression) {
399
399
400
400
boolean unconditional = true ;
401
401
DataFlowInfo unconditionalDataFlowInfo = receiverDataFlowInfo ;
402
- ExpressionTypingContext contextForSelector = currentContext ;
403
402
404
403
for (CallExpressionElement element : elementChain ) {
405
404
if (receiverType == null ) {
@@ -413,14 +412,14 @@ public Boolean invoke(KtSimpleNameExpression nameExpression) {
413
412
414
413
boolean lastStage = element .getQualified () == expression ;
415
414
// Drop NO_EXPECTED_TYPE / INDEPENDENT at last stage
416
- ExpressionTypingContext baseContext = lastStage ? context : currentContext ;
415
+ ExpressionTypingContext contextForSelector = lastStage ? context : currentContext ;
417
416
if (TypeUtils .isNullableType (receiverType ) && !element .getSafe ()) {
418
417
// Call with nullable receiver: take unconditional data flow info
419
- contextForSelector = baseContext .replaceDataFlowInfo (unconditionalDataFlowInfo );
418
+ contextForSelector = contextForSelector .replaceDataFlowInfo (unconditionalDataFlowInfo );
420
419
}
421
420
else {
422
421
// Take data flow info from the current receiver
423
- contextForSelector = baseContext .replaceDataFlowInfo (receiverDataFlowInfo );
422
+ contextForSelector = contextForSelector .replaceDataFlowInfo (receiverDataFlowInfo );
424
423
}
425
424
426
425
if (receiver instanceof ReceiverValue ) {
You can’t perform that action at this time.
0 commit comments