blob: 72079f86224da5bcd4373a476faa8e37b9f502ec [file]
// LANGUAGE: +ContextParameters
@file:OptIn(ExperimentalVersionOverloading::class)
context(prefix: String)
fun contextVersioned(
value: String = "O",
@IntroducedAt("1") suffix: String = "K",
): String = prefix + value + suffix
fun box(): String {
if (with("P") { contextVersioned() } != "POK") return "FAIL default"
if (with("P") { contextVersioned("A", "B") } != "PAB") return "FAIL explicit"
return "OK"
}