KT-56508 Add a test

This commit is contained in:
Pavel Mikhailovskii
2023-02-21 16:22:26 +00:00
committed by Space Team
parent bfa2937fb8
commit 81746e5aa1
4 changed files with 36 additions and 0 deletions
@@ -17612,6 +17612,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt54357.kt");
}
@Test
@TestMetadata("kt56508.kt")
public void testKt56508() throws Exception {
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt56508.kt");
}
@Test
@TestMetadata("overload.kt")
public void testOverload() throws Exception {
@@ -17612,6 +17612,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt54357.kt");
}
@Test
@TestMetadata("kt56508.kt")
public void testKt56508() throws Exception {
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt56508.kt");
}
@Test
@TestMetadata("overload.kt")
public void testOverload() throws Exception {
@@ -0,0 +1,18 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
fun box(): String {
with(Ctx()) {
Foo(1)
}
return "OK"
}
context(Ctx)
class Foo constructor(
i: Int
) {
constructor() : this(1)
}
class Ctx
@@ -17612,6 +17612,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt54357.kt");
}
@Test
@TestMetadata("kt56508.kt")
public void testKt56508() throws Exception {
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt56508.kt");
}
@Test
@TestMetadata("overload.kt")
public void testOverload() throws Exception {