NI: intersect DFI types before capturing

^KT-37887 Fixed
This commit is contained in:
Victor Petukhov
2020-05-14 13:43:30 +03:00
parent 5a7ceec985
commit 73dec25eb1
15 changed files with 141 additions and 32 deletions
@@ -303,6 +303,7 @@ object AbstractTypeChecker {
if (!anyNonOutParameter && isSubtypeForSameConstructor(newArguments, superType)) return true
// TODO: rethink this; now components order in intersection type affects semantic due to run subtyping (which can add constraints) only until the first successful candidate
return supertypesWithSameConstructor.any { isSubtypeForSameConstructor(it.asArgumentList(), superType) }
}
}