KT-51951 Add a test

This commit is contained in:
Pavel Mikhailovskii
2022-12-08 15:33:28 +01:00
committed by Space Team
parent 01cabefea7
commit b31209a38a
3 changed files with 29 additions and 0 deletions
@@ -17468,6 +17468,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt51863.kt");
}
@Test
@TestMetadata("kt51951.kt")
public void testKt51951() throws Exception {
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt51951.kt");
}
@Test
@TestMetadata("kt52207.kt")
public void testKt52207() throws Exception {
@@ -0,0 +1,17 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
typealias StringProvider = () -> String
context(StringProvider)
fun doSomething() {
println(this@StringProvider())
}
fun box(): String {
with({ "" }) {
doSomething()
}
return "OK"
}
@@ -17468,6 +17468,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt51863.kt");
}
@Test
@TestMetadata("kt51951.kt")
public void testKt51951() throws Exception {
runTest("compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt51951.kt");
}
@Test
@TestMetadata("kt52207.kt")
public void testKt52207() throws Exception {