FIR: Fix candidate receivers orders when choosing a context receiver
^KT-53257 Fixed
This commit is contained in:
+6
@@ -17182,6 +17182,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/propertyCompoundAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("receiversOrder.kt")
|
||||
public void testReceiversOrder() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/receiversOrder.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleCall.kt")
|
||||
public void testSimpleCall() throws Exception {
|
||||
|
||||
@@ -200,7 +200,7 @@ object CheckContextReceivers : ResolutionStage() {
|
||||
}?.takeUnless { it.isEmpty() } ?: return
|
||||
|
||||
val receiverGroups: List<List<ImplicitReceiverValue<*>>> =
|
||||
context.bodyResolveContext.towerDataContext.towerDataElements.mapNotNull { towerDataElement ->
|
||||
context.bodyResolveContext.towerDataContext.towerDataElements.asReversed().mapNotNull { towerDataElement ->
|
||||
towerDataElement.implicitReceiver?.let(::listOf) ?: towerDataElement.contextReceiverGroup
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user