Fix potential CCE -- use unwrappedType after instanceof check.

This commit is contained in:
Stanislav Erokhin
2017-02-16 05:32:26 +03:00
parent d24ebf711b
commit 81df7645e0
@@ -89,11 +89,11 @@ public class CommonSupertypes {
for (KotlinType type : types) {
UnwrappedType unwrappedType = type.unwrap();
if (unwrappedType instanceof FlexibleType) {
if (DynamicTypesKt.isDynamic(type)) {
return type;
if (DynamicTypesKt.isDynamic(unwrappedType)) {
return unwrappedType;
}
hasFlexible = true;
FlexibleType flexibleType = (FlexibleType) type;
FlexibleType flexibleType = (FlexibleType) unwrappedType;
upper.add(flexibleType.getUpperBound());
lower.add(flexibleType.getLowerBound());
}