From c158c64ee00f86529092f953ccc03e124ca59fb2 Mon Sep 17 00:00:00 2001 From: Victor Petukhov Date: Thu, 4 Feb 2021 12:11:03 +0300 Subject: [PATCH] Reformat TypeWithEnhancement.kt --- .../kotlin/types/TypeWithEnhancement.kt | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/TypeWithEnhancement.kt b/core/descriptors/src/org/jetbrains/kotlin/types/TypeWithEnhancement.kt index ca53bc49873..36a32961d0a 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/TypeWithEnhancement.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/TypeWithEnhancement.kt @@ -28,18 +28,18 @@ interface TypeWithEnhancement { } class SimpleTypeWithEnhancement( - override val delegate: SimpleType, - override val enhancement: KotlinType + override val delegate: SimpleType, + override val enhancement: KotlinType ) : DelegatingSimpleType(), TypeWithEnhancement { override val origin: UnwrappedType get() = delegate - override fun replaceAnnotations(newAnnotations: Annotations): SimpleType - = origin.replaceAnnotations(newAnnotations).wrapEnhancement(enhancement) as SimpleType + override fun replaceAnnotations(newAnnotations: Annotations): SimpleType = + origin.replaceAnnotations(newAnnotations).wrapEnhancement(enhancement) as SimpleType - override fun makeNullableAsSpecified(newNullability: Boolean): SimpleType - = origin.makeNullableAsSpecified(newNullability).wrapEnhancement(enhancement.unwrap().makeNullableAsSpecified(newNullability)) as SimpleType + override fun makeNullableAsSpecified(newNullability: Boolean): SimpleType = origin.makeNullableAsSpecified(newNullability) + .wrapEnhancement(enhancement.unwrap().makeNullableAsSpecified(newNullability)) as SimpleType @TypeRefinement override fun replaceDelegate(delegate: SimpleType) = SimpleTypeWithEnhancement(delegate, enhancement) @@ -47,23 +47,23 @@ class SimpleTypeWithEnhancement( @TypeRefinement @OptIn(TypeRefinement::class) override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): SimpleTypeWithEnhancement = - SimpleTypeWithEnhancement( - kotlinTypeRefiner.refineType(delegate) as SimpleType, - kotlinTypeRefiner.refineType(enhancement) - ) + SimpleTypeWithEnhancement( + kotlinTypeRefiner.refineType(delegate) as SimpleType, + kotlinTypeRefiner.refineType(enhancement) + ) } class FlexibleTypeWithEnhancement( - override val origin: FlexibleType, - override val enhancement: KotlinType + override val origin: FlexibleType, + override val enhancement: KotlinType ) : FlexibleType(origin.lowerBound, origin.upperBound), TypeWithEnhancement { - override fun replaceAnnotations(newAnnotations: Annotations): UnwrappedType - = origin.replaceAnnotations(newAnnotations).wrapEnhancement(enhancement) + override fun replaceAnnotations(newAnnotations: Annotations): UnwrappedType = + origin.replaceAnnotations(newAnnotations).wrapEnhancement(enhancement) - override fun makeNullableAsSpecified(newNullability: Boolean): UnwrappedType - = origin.makeNullableAsSpecified(newNullability).wrapEnhancement(enhancement.unwrap().makeNullableAsSpecified(newNullability)) + override fun makeNullableAsSpecified(newNullability: Boolean): UnwrappedType = + origin.makeNullableAsSpecified(newNullability).wrapEnhancement(enhancement.unwrap().makeNullableAsSpecified(newNullability)) override fun render(renderer: DescriptorRenderer, options: DescriptorRendererOptions): String { if (options.enhancedTypes) {