Minor. Turn TypeBasedStarProjectionImpl into StarProjectionForAbsentTypeParameter

It's needed to avoid abusing of the class
Star projections should be created based on the relevant type parameter
whenever it's possible
This commit is contained in:
Denis Zharkov
2019-07-12 14:15:56 +03:00
committed by Dmitry Savvinov
parent 579838cb4e
commit ffaca279bc
2 changed files with 14 additions and 10 deletions
@@ -241,7 +241,7 @@ class TypeDeserializer(
private fun typeArgument(parameter: TypeParameterDescriptor?, typeArgumentProto: ProtoBuf.Type.Argument): TypeProjection {
if (typeArgumentProto.projection == ProtoBuf.Type.Argument.Projection.STAR) {
return if (parameter == null)
TypeBasedStarProjectionImpl(c.components.moduleDescriptor.builtIns.nullableAnyType)
StarProjectionForAbsentTypeParameter(c.components.moduleDescriptor.builtIns)
else
StarProjectionImpl(parameter)
}