KT-52791 Make it possible to pass multiple context receivers to a class
This commit is contained in:
committed by
Space Team
parent
62217b39ec
commit
906c161068
+6
-6
@@ -1,8 +1,8 @@
|
||||
class A<T : Any?> {
|
||||
private /* final field */ val contextReceiverField0: T
|
||||
constructor(<this>: T) /* primary */ {
|
||||
constructor(_context_receiver_0: T) /* primary */ {
|
||||
super/*Any*/()
|
||||
<this>.#contextReceiverField0 = <this>
|
||||
<this>.#contextReceiverField0 = _context_receiver_0
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
@@ -11,9 +11,9 @@ class A<T : Any?> {
|
||||
|
||||
class B<P : Any?> {
|
||||
private /* final field */ val contextReceiverField0: Collection<P>
|
||||
constructor(<this>: Collection<P>) /* primary */ {
|
||||
constructor(_context_receiver_0: Collection<P>) /* primary */ {
|
||||
super/*Any*/()
|
||||
<this>.#contextReceiverField0 = <this>
|
||||
<this>.#contextReceiverField0 = _context_receiver_0
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
@@ -21,9 +21,9 @@ class B<P : Any?> {
|
||||
}
|
||||
|
||||
fun Int.foo() {
|
||||
A<Int>(<this> = <this>) /*~> Unit */
|
||||
A<Int>(_context_receiver_0 = <this>) /*~> Unit */
|
||||
}
|
||||
|
||||
fun Collection<Int>.bar() {
|
||||
B<Int>(<this> = <this>) /*~> Unit */
|
||||
B<Int>(_context_receiver_0 = <this>) /*~> Unit */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user