Make sure type arguments are serialized in the proper order.

This commit is contained in:
Alexander Gorshenev
2017-04-25 18:06:02 +03:00
committed by alexander-gorshenev
parent 2ae88c9731
commit f56e68e255
@@ -84,6 +84,12 @@ internal class IrDescriptorSerializer(
val typeParameters = descriptor.propertyIfAccessor.typeParameters
typeParameters.forEach {
proto.addTypeParameter(serializeDescriptor(it))
// We explicitly serialize type parameters
// as types here so that they are interned in the
// natural order of declaration. Otherwise
// they appear in the order of appearence in the
// body of the function, and get wrong indices.
typeSerializer(it.defaultType)
}
descriptor.valueParameters.forEach {