Migrate UseExperimental->OptIn in project sources

This commit is contained in:
Alexander Udalov
2020-01-28 15:35:42 +01:00
parent 125b39d9be
commit 795d6ab407
164 changed files with 213 additions and 211 deletions
@@ -563,7 +563,7 @@ class LazyJavaClassMemberScope(
private fun computeSupertypes(): Collection<KotlinType> {
if (skipRefinement) return ownerDescriptor.typeConstructor.supertypes
@UseExperimental(TypeRefinement::class)
@OptIn(TypeRefinement::class)
return c.components.kotlinTypeChecker.kotlinTypeRefiner.refineSupertypes(ownerDescriptor)
}
@@ -91,7 +91,7 @@ class RawTypeImpl private constructor(lowerBound: SimpleType, upperBound: Simple
}
@TypeRefinement
@UseExperimental(TypeRefinement::class)
@OptIn(TypeRefinement::class)
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): FlexibleType {
return RawTypeImpl(
kotlinTypeRefiner.refineType(lowerBound) as SimpleType,
@@ -160,7 +160,7 @@ internal object RawSubstitution : TypeSubstitution() {
type.isMarkedNullable, memberScope
) factory@{ kotlinTypeRefiner ->
val classId = (declaration as? ClassDescriptor)?.classId ?: return@factory null
@UseExperimental(TypeRefinement::class)
@OptIn(TypeRefinement::class)
val refinedClassDescriptor = kotlinTypeRefiner.findClassAcrossModuleDependencies(classId) ?: return@factory null
if (refinedClassDescriptor == declaration) return@factory null