Intersection types are no more allowed in signatures #KT-10244 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-12-22 19:46:09 +03:00
parent f56dc722d9
commit 6b8b39a7bd
8 changed files with 82 additions and 3 deletions
@@ -404,10 +404,11 @@ public class JetTypeMapper {
}
TypeConstructor constructor = jetType.getConstructor();
DeclarationDescriptor descriptor = constructor.getDeclarationDescriptor();
if (constructor instanceof IntersectionTypeConstructor) {
jetType = CommonSupertypes.commonSupertype(new ArrayList<KotlinType>(constructor.getSupertypes()));
constructor = jetType.getConstructor();
}
DeclarationDescriptor descriptor = constructor.getDeclarationDescriptor();
if (descriptor == null) {
throw new UnsupportedOperationException("no descriptor for type constructor of " + jetType);