[FIR] Report UNSUPPORTED_CONTEXTUAL_DECLARATION_CALL
^KT-59969 Fixed
This commit is contained in:
committed by
Space Team
parent
906c27736f
commit
7151e6a41c
-37
@@ -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
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface Context1
|
||||
|
||||
interface Context2<A> {
|
||||
|
||||
Reference in New Issue
Block a user