Skip to content

Commit 81df764

Browse files
committed
Fix potential CCE -- use unwrappedType after instanceof check.
1 parent d24ebf7 commit 81df764

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/frontend/src/org/jetbrains/kotlin/types/CommonSupertypes.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ private static KotlinType findCommonSupertype(@NotNull Collection<KotlinType> ty
8989
for (KotlinType type : types) {
9090
UnwrappedType unwrappedType = type.unwrap();
9191
if (unwrappedType instanceof FlexibleType) {
92-
if (DynamicTypesKt.isDynamic(type)) {
93-
return type;
92+
if (DynamicTypesKt.isDynamic(unwrappedType)) {
93+
return unwrappedType;
9494
}
9595
hasFlexible = true;
96-
FlexibleType flexibleType = (FlexibleType) type;
96+
FlexibleType flexibleType = (FlexibleType) unwrappedType;
9797
upper.add(flexibleType.getUpperBound());
9898
lower.add(flexibleType.getLowerBound());
9999
}

0 commit comments

Comments
 (0)