From 3ef760604b19c1c73de2a31afd72b61582f9db13 Mon Sep 17 00:00:00 2001 From: Dmitry Savvinov Date: Fri, 10 Jul 2020 20:02:44 +0700 Subject: [PATCH] Force expansion to have the same nullability as abbreviation Note that classifier.underlyingType is always non-nullable, but abbreviation might be nullable, so we should keep them consistent ^KT-40199 Fixed --- .../kotlin/descriptors/commonizer/builder/builderUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/builderUtils.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/builderUtils.kt index a362ea2e976..3adbaadff8e 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/builderUtils.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/builderUtils.kt @@ -131,7 +131,7 @@ internal fun CirSimpleType.buildType( ) return if (classifier is TypeAliasDescriptor) - classifier.underlyingType.withAbbreviation(simpleType) + classifier.underlyingType.makeNullableAsSpecified(simpleType.isMarkedNullable).withAbbreviation(simpleType) else simpleType }