KT-11588 Type aliases

Proper abbreviated type for '<type-alias>?'
This commit is contained in:
Dmitry Petrov
2016-05-18 17:19:16 +03:00
parent 440e02016b
commit 8bf87a9a4f
2 changed files with 11 additions and 2 deletions
@@ -91,7 +91,16 @@ public class PossiblyBareType {
if (isBare()) {
return isBareTypeNullable() ? this : bare(getBareTypeConstructor(), true);
}
return type(TypeUtils.makeNullable(getActualType()));
KotlinType nullableActualType = TypeUtils.makeNullable(getActualType());
KotlinType abbreviatedType = TypeCapabilitiesKt.getAbbreviatedType(getActualType());
if (abbreviatedType == null) {
return type(nullableActualType);
}
else {
return type(TypeCapabilitiesKt.withAbbreviatedType(nullableActualType, TypeUtils.makeNullable(abbreviatedType)));
}
}
@NotNull
@@ -4,6 +4,6 @@ public typealias S = kotlin.String
public typealias SS = S
public typealias SSS = SS
public val s1: SSS [= kotlin.String] = ""
public val s2: SSS [= kotlin.String?] = null
public val s2: SSS? [= kotlin.String?] = null
public val s3: kotlin.collections.List<SSS [= kotlin.String]>? = null
public val s4: kotlin.collections.List<kotlin.collections.List<SSS [= kotlin.String]>?>? = null