Fix common super type calculation for captured dynamic types

^KT-32499 Fixed
This commit is contained in:
victor.petukhov
2019-11-25 19:03:43 +03:00
parent 1c4c5520a2
commit dbacae94d0
5 changed files with 73 additions and 1 deletions
@@ -41,7 +41,11 @@ object NewCommonSuperTypeCalculator {
val lowers = types.map {
when (it) {
is SimpleTypeMarker -> it
is SimpleTypeMarker -> {
if (it.isCapturedDynamic()) return it
it
}
is FlexibleTypeMarker -> {
if (it.isDynamic()) return it
// raw types are allowed here and will be transformed to FlexibleTypes