diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallCompleter.kt b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallCompleter.kt index ebf4d0e9ca9..da8f67e4232 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallCompleter.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallCompleter.kt @@ -326,6 +326,6 @@ public class CallCompleter( //If a receiver type is not null, then this safe expression is useless, and we don't need to make the result type nullable. val expressionType = trace[BindingContext.EXPRESSION_TYPE, expression.getReceiverExpression()] - return expressionType != null && expressionType.isNullable() + return expressionType != null && TypeUtils.isNullableType(expressionType) } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/platformTypes/elvis.kt b/compiler/testData/diagnostics/tests/platformTypes/elvis.kt index aa64609c86f..6507d737ae9 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/elvis.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/elvis.kt @@ -1,3 +1,5 @@ +// !DIAGNOSTICS: -UNUSED_EXPRESSION + // FILE: p/J.java package p;