Add assertion into DynamicTypeFactory about type range.

This commit is contained in:
Stanislav Erokhin
2016-04-22 19:32:33 +03:00
parent 8f32eeb663
commit ca74f0d86e
2 changed files with 11 additions and 2 deletions
@@ -88,6 +88,9 @@ public class CommonSupertypes {
Set<FlexibleTypeFactory> factories = new LinkedHashSet<FlexibleTypeFactory>();
for (KotlinType type : types) {
if (FlexibleTypesKt.isFlexible(type)) {
if (DynamicTypesKt.isDynamic(type)) {
return type;
}
hasFlexible = true;
Flexibility flexibility = FlexibleTypesKt.flexibility(type);
upper.add(flexibility.getUpperBound());