FIR deserializer: provide type parameters for type-aliases
This commit is contained in:
committed by
Mikhail Glukhikh
parent
9d7d358836
commit
c487c1443f
+5
-2
@@ -126,6 +126,7 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
|
||||
fun loadTypeAlias(proto: ProtoBuf.TypeAlias): FirTypeAlias {
|
||||
val flags = proto.flags
|
||||
val name = c.nameResolver.getName(proto.name)
|
||||
val local = c.childContext(proto.typeParameterList)
|
||||
return FirTypeAliasImpl(
|
||||
c.session,
|
||||
null,
|
||||
@@ -137,11 +138,13 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
|
||||
FirResolvedTypeRefImpl(
|
||||
c.session,
|
||||
null,
|
||||
c.typeDeserializer.type(proto.underlyingType(c.typeTable)),
|
||||
local.typeDeserializer.type(proto.underlyingType(c.typeTable)),
|
||||
false,
|
||||
emptyList() /* TODO */
|
||||
)
|
||||
)
|
||||
).apply {
|
||||
typeParameters += local.typeDeserializer.ownTypeParameters.map { it.firUnsafe() }
|
||||
}
|
||||
}
|
||||
|
||||
fun loadProperty(proto: ProtoBuf.Property): FirProperty {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: typeAliasDeserialization.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval a: R|java/util/LinkedHashSet| = R|java/util/LinkedHashSet.LinkedHashSet|()
|
||||
lval a: R|java/util/LinkedHashSet<kotlin/String>| = R|java/util/LinkedHashSet.LinkedHashSet|<R|kotlin/String|>()
|
||||
R|<local>/a|.<Inapplicable(INAPPLICABLE): [java/util/HashSet.add, java/util/AbstractCollection.add, java/util/Collection.add, java/util/Set.add]>#(String())
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
FILE: treeSet.kt
|
||||
public final val x: R|java/util/SortedSet<kotlin/Int>| = R|java/util/TreeSet.TreeSet|()
|
||||
public final val x: R|java/util/SortedSet<kotlin/Int>| = R|java/util/TreeSet.TreeSet|<R|kotlin/Any|?>()
|
||||
public get(): R|java/util/SortedSet<kotlin/Int>|
|
||||
|
||||
Reference in New Issue
Block a user