Incorrect comparison fixed

This commit is contained in:
Andrey Breslav
2012-10-17 12:20:40 +04:00
parent 937c4e8baf
commit 3121f1ad5c
@@ -293,7 +293,7 @@ public class PatternMatchingTypingVisitor extends ExpressionTypingVisitor {
}
// check if the pattern is essentially a 'null' expression
if (type == KotlinBuiltIns.getInstance().getNullableNothingType() && !subjectType.isNullable()) {
if (KotlinBuiltIns.getInstance().isNullableNothing(type) && !subjectType.isNullable()) {
context.trace.report(SENSELESS_NULL_IN_WHEN.on(reportErrorOn));
}
}