KT-56508 Add a test
This commit is contained in:
committed by
Space Team
parent
bfa2937fb8
commit
81746e5aa1
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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
|
||||
+6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user