[FIR] Report UNSUPPORTED_CONTEXTUAL_DECLARATION_CALL

^KT-59969 Fixed
This commit is contained in:
Nikolay Lunyak
2023-08-03 10:22:32 +03:00
committed by Space Team
parent 906c27736f
commit 7151e6a41c
9 changed files with 19 additions and 44 deletions
@@ -1,37 +0,0 @@
interface Context1
interface Context2<A> {
fun getContextElement(): A
}
class Context2Impl<A>(value: A) : Context2<A> {
override fun getContextElement(): A
val value: A
}
context(Int, String)
class A {
constructor(int: Int)
}
context(Context1, c2@Context2<String>)
class B {
override fun toString(): String
}
context(Context2<A>)
class C<A> {
val a: A
get()
}
context(Context1)
@Deprecated(message = "Use `B` instead.")
class D
context(b@B, `fun`@A)
fun foo()
context(Context2<C<String>>)
fun bar(): ERROR
@@ -1,3 +1,5 @@
// !LANGUAGE: +ContextReceivers
interface Context1
interface Context2<A> {