From 3121f1ad5c05d8671afa839713b07da4895c3f36 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Wed, 17 Oct 2012 12:20:40 +0400 Subject: [PATCH] Incorrect comparison fixed --- .../lang/types/expressions/PatternMatchingTypingVisitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/PatternMatchingTypingVisitor.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/PatternMatchingTypingVisitor.java index 637250f8568..fe2e144abba 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/PatternMatchingTypingVisitor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/PatternMatchingTypingVisitor.java @@ -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)); } }