Fix mapping of platform inline class types

For the inline class:
 ```
 inline class IC(val x: Int)
 ```

 Type (IC..IC?) should be mapped to the wrapper `IC`
 because it can hold object and also because it does so for primitives

 #KT-28983 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-12-23 20:24:22 +03:00
parent 7c9ca99388
commit e509649132
6 changed files with 85 additions and 1 deletions
@@ -284,7 +284,7 @@ internal fun computeExpandedTypeInner(kotlinType: KotlinType, visitedClassifiers
val underlyingType = kotlinType.substitutedUnderlyingType() ?: return null
val expandedUnderlyingType = computeExpandedTypeInner(underlyingType, visitedClassifiers) ?: return null
when {
!kotlinType.isMarkedNullable -> expandedUnderlyingType
!kotlinType.isNullable() -> expandedUnderlyingType
// Here inline class type is nullable. Apply nullability to the expandedUnderlyingType.