K2: add test to confirm KT-54139 now works properly

This commit is contained in:
Mikhail Glukhikh
2023-11-08 12:02:21 +01:00
committed by Space Team
parent bb608740cd
commit cf9bd44cf7
9 changed files with 68 additions and 0 deletions
@@ -19340,6 +19340,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
}
@Test
@TestMetadata("contextReceiverToExtensionReceiver.kt")
public void testContextReceiverToExtensionReceiver() throws Exception {
runTest("compiler/testData/codegen/box/fir/contextReceiverToExtensionReceiver.kt");
}
@Test
@TestMetadata("CustomHashSetSize.kt")
public void testCustomHashSetSize() throws Exception {
@@ -19340,6 +19340,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
}
@Test
@TestMetadata("contextReceiverToExtensionReceiver.kt")
public void testContextReceiverToExtensionReceiver() throws Exception {
runTest("compiler/testData/codegen/box/fir/contextReceiverToExtensionReceiver.kt");
}
@Test
@TestMetadata("CustomHashSetSize.kt")
public void testCustomHashSetSize() throws Exception {
@@ -19005,6 +19005,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
}
@Test
@TestMetadata("contextReceiverToExtensionReceiver.kt")
public void testContextReceiverToExtensionReceiver() throws Exception {
runTest("compiler/testData/codegen/box/fir/contextReceiverToExtensionReceiver.kt");
}
@Test
@TestMetadata("CustomHashSetSize.kt")
public void testCustomHashSetSize() throws Exception {
@@ -19005,6 +19005,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
}
@Test
@TestMetadata("contextReceiverToExtensionReceiver.kt")
public void testContextReceiverToExtensionReceiver() throws Exception {
runTest("compiler/testData/codegen/box/fir/contextReceiverToExtensionReceiver.kt");
}
@Test
@TestMetadata("CustomHashSetSize.kt")
public void testCustomHashSetSize() throws Exception {
@@ -19005,6 +19005,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
}
@Test
@TestMetadata("contextReceiverToExtensionReceiver.kt")
public void testContextReceiverToExtensionReceiver() throws Exception {
runTest("compiler/testData/codegen/box/fir/contextReceiverToExtensionReceiver.kt");
}
@Test
@TestMetadata("CustomHashSetSize.kt")
public void testCustomHashSetSize() throws Exception {
@@ -0,0 +1,21 @@
// LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// ISSUE: KT-54139
class A
class B
fun B.extensionFunction() {}
context(A, B)
fun test() {
extensionFunction()
}
fun box(): String {
with(A()) {
with(B()) {
test()
}
}
return "OK"
}
@@ -19005,6 +19005,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
}
@Test
@TestMetadata("contextReceiverToExtensionReceiver.kt")
public void testContextReceiverToExtensionReceiver() throws Exception {
runTest("compiler/testData/codegen/box/fir/contextReceiverToExtensionReceiver.kt");
}
@Test
@TestMetadata("CustomHashSetSize.kt")
public void testCustomHashSetSize() throws Exception {
@@ -19005,6 +19005,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
}
@Test
@TestMetadata("contextReceiverToExtensionReceiver.kt")
public void testContextReceiverToExtensionReceiver() throws Exception {
runTest("compiler/testData/codegen/box/fir/contextReceiverToExtensionReceiver.kt");
}
@Test
@TestMetadata("CustomHashSetSize.kt")
public void testCustomHashSetSize() throws Exception {
@@ -15845,6 +15845,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/fir/ConstValAccess.kt");
}
@TestMetadata("contextReceiverToExtensionReceiver.kt")
public void testContextReceiverToExtensionReceiver() throws Exception {
runTest("compiler/testData/codegen/box/fir/contextReceiverToExtensionReceiver.kt");
}
@TestMetadata("CustomHashSetSize.kt")
public void testCustomHashSetSize() throws Exception {
runTest("compiler/testData/codegen/box/fir/CustomHashSetSize.kt");