More cleanup: lift return / assignment out
This commit is contained in:
+4
-4
@@ -30,12 +30,12 @@ object DynamicTypeDeserializer : FlexibleTypeDeserializer {
|
||||
|
||||
override fun create(proto: ProtoBuf.Type, flexibleId: String, lowerBound: SimpleType, upperBound: SimpleType): KotlinType {
|
||||
if (flexibleId != id) return ErrorUtils.createErrorType("Unexpected id: $flexibleId. ($lowerBound..$upperBound)")
|
||||
if (StrictEqualityTypeChecker.strictEqualTypes(lowerBound, lowerBound.builtIns.nothingType) &&
|
||||
StrictEqualityTypeChecker.strictEqualTypes(upperBound, upperBound.builtIns.nullableAnyType)) {
|
||||
return createDynamicType(lowerBound.builtIns)
|
||||
return if (StrictEqualityTypeChecker.strictEqualTypes(lowerBound, lowerBound.builtIns.nothingType) &&
|
||||
StrictEqualityTypeChecker.strictEqualTypes(upperBound, upperBound.builtIns.nullableAnyType)) {
|
||||
createDynamicType(lowerBound.builtIns)
|
||||
}
|
||||
else {
|
||||
return ErrorUtils.createErrorType("Illegal type range for dynamic type: $lowerBound..$upperBound")
|
||||
ErrorUtils.createErrorType("Illegal type range for dynamic type: $lowerBound..$upperBound")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user