Introduce KotlinTypeFactory

This commit is contained in:
Stanislav Erokhin
2016-05-20 19:24:32 +03:00
parent 8c6dd95e3f
commit 3a451744c5
29 changed files with 136 additions and 110 deletions
@@ -195,10 +195,7 @@ class LazyJavaClassDescriptor(
parameter -> TypeProjectionImpl(Variance.INVARIANT, parameter.defaultType)
}
return KotlinTypeImpl.create(
Annotations.EMPTY, classDescriptor,
/* nullable =*/ false, parametersAsTypeProjections
)
return KotlinTypeFactory.simpleNotNullType(Annotations.EMPTY, classDescriptor, parametersAsTypeProjections)
}
private fun getPurelyImplementsFqNameFromAnnotation(): FqName? {
@@ -106,9 +106,8 @@ internal object RawSubstitution : TypeSubstitution() {
val arguments = listOf(
TypeProjectionImpl(componentTypeProjection.projectionKind, eraseType(componentTypeProjection.type))
)
return KotlinTypeImpl.create(
type.annotations, type.constructor, type.isMarkedNullable, arguments,
(type.constructor.declarationDescriptor as ClassDescriptor).getMemberScope(arguments)
return KotlinTypeFactory.simpleType(type.annotations, type.constructor, arguments,
type.isMarkedNullable, (type.constructor.declarationDescriptor as ClassDescriptor).getMemberScope(arguments)
)
}