2cd16f055a
- `context(...)` is a modifier that must precede annotations and other modifiers, so for declarations it is rendered in `renderAnnotationsAndModifiers`. - Ignore `@ContextFunctionTypeParams` in the annotation list of FE10 types, as the annotation is an implementation detail of context receivers in K1 and shouldn't be rendered. ^KT-55098 fixed
38 lines
531 B
Plaintext
Vendored
38 lines
531 B
Plaintext
Vendored
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
|