Minor. Logic clarified

This commit is contained in:
Andrey Breslav
2015-02-06 15:37:27 +03:00
parent fcb6055913
commit 0b41136c7c
@@ -173,8 +173,9 @@ public class JavaNullabilityWarningsChecker : AdditionalTypeChecker {
if (TypeUtils.noExpectedType(expectedType)) return
val expectedMustNotBeNull = expectedType.mustNotBeNull()
val actualNullabilityInKotlin = dataFlowInfo.getNullability(dataFlowValue)
val actualMayBeNull = if (actualNullabilityInKotlin == Nullability.NOT_NULL) null else expressionType.mayBeNull()
if (dataFlowInfo.getNullability(dataFlowValue) == Nullability.NOT_NULL) return
val actualMayBeNull = expressionType.mayBeNull()
if (expectedMustNotBeNull == NullabilityInformationSource.KOTLIN && actualMayBeNull == NullabilityInformationSource.KOTLIN) {
// a type mismatch error will be reported elsewhere