[NI] Fix not-null smartcast on intersection of nullable types

#KT-28670 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-12-06 17:47:33 +03:00
parent 383c2d1bff
commit 6ebbb6eae3
6 changed files with 48 additions and 3 deletions
@@ -81,8 +81,8 @@ class DefinitelyNotNullType private constructor(val original: SimpleType) : Dele
}
}
fun makesSenseToBeDefinitelyNotNull(type: UnwrappedType): Boolean =
type.canHaveUndefinedNullability() && !NullabilityChecker.isSubtypeOfAny(type)
private fun makesSenseToBeDefinitelyNotNull(type: UnwrappedType): Boolean =
type.canHaveUndefinedNullability() && !NullabilityChecker.isSubtypeOfAny(type)
}
override val delegate: SimpleType