Fix metadata deserialization for context receivers with type table
In DeserializedClassDescriptor and MemberDeserializer, only the `contextReceiverTypeList` field was used, and not `contextReceiverTypeIdList` which is used when `-Xuse-type-table` is enabled. The convention is to use a bunch of utilities declared in `protoTypeTableUtil.kt` which deal with both methods of reading types. Also, simplify the deserialization code in FIR (which was correct for some reason).
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
package test
|
||||
|
||||
interface A
|
||||
interface B
|
||||
|
||||
context(A) class C {
|
||||
context(B) fun f() {}
|
||||
}
|
||||
|
||||
context(A) fun g() {}
|
||||
context(B) val h: Int get() = 42
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package test
|
||||
|
||||
context(test.B) public val h: kotlin.Int
|
||||
context(test.B) public fun `<get-h>`(): kotlin.Int
|
||||
context(test.A) public fun g(): kotlin.Unit
|
||||
|
||||
public interface A {
|
||||
}
|
||||
|
||||
public interface B {
|
||||
}
|
||||
|
||||
context(test.A) public final class C {
|
||||
/*primary*/ public constructor C()
|
||||
context(test.B) public final fun f(): kotlin.Unit
|
||||
}
|
||||
Reference in New Issue
Block a user