[FIR] Introduce ConeDynamicType
This commit is contained in:
+9
-1
@@ -115,7 +115,15 @@ class FirTypeDeserializer(
|
||||
if (proto.hasFlexibleTypeCapabilitiesId()) {
|
||||
val lowerBound = simpleType(proto, attributes)
|
||||
val upperBound = simpleType(proto.flexibleUpperBound(typeTable)!!, attributes)
|
||||
return ConeFlexibleType(lowerBound!!, upperBound!!)
|
||||
|
||||
val isDynamic = lowerBound == moduleData.session.builtinTypes.nothingType.coneType &&
|
||||
upperBound == moduleData.session.builtinTypes.nullableAnyType.coneType
|
||||
|
||||
return if (isDynamic) {
|
||||
ConeDynamicType.create(moduleData.session)
|
||||
} else {
|
||||
ConeFlexibleType(lowerBound!!, upperBound!!)
|
||||
}
|
||||
}
|
||||
|
||||
return simpleType(proto, attributes) ?: ConeErrorType(ConeSimpleDiagnostic("?!id:0", DiagnosticKind.DeserializationError))
|
||||
|
||||
Reference in New Issue
Block a user