[K2] Disappeared UNSUPPORTED_FEATURE (1)

Added a check for the enabled context receivers feature flag for typeRef.

^KT-59913
This commit is contained in:
Anastasia.Nekrasova
2023-11-06 23:38:06 +02:00
committed by Space Team
parent 471f25abfc
commit 685c8e4fe7
3 changed files with 36 additions and 2 deletions
@@ -1,8 +1,8 @@
// !DIAGNOSTICS: -UNCHECKED_CAST
context(Any)
fun f(g: context(Any) () -> Unit, value: Any): context(A) () -> Unit {
return value as (context(A) () -> Unit)
fun f(g: <!UNSUPPORTED_FEATURE!>context(Any) () -> Unit<!>, value: Any): <!UNSUPPORTED_FEATURE!>context(A) () -> Unit<!> {
return value as <!UNSUPPORTED_FEATURE!>(context(A) () -> Unit)<!>
}
fun f(g: () -> Unit, value: Any) : () -> Unit {