KT-51951 Add a test
This commit is contained in:
committed by
Space Team
parent
01cabefea7
commit
b31209a38a
+6
@@ -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"
|
||||
}
|
||||
+6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user