Another TypeUtils.isNullableType() introduced

This commit is contained in:
Andrey Breslav
2014-08-27 17:46:35 +04:00
parent 12d18533e8
commit d1214d2368
3 changed files with 32 additions and 1 deletions
@@ -143,7 +143,7 @@ public class CompileTimeConstantChecker {
}
private boolean checkNullValue(@NotNull JetType expectedType, @NotNull JetConstantExpression expression) {
if (!noExpectedTypeOrError(expectedType) && !expectedType.isNullable()) {
if (!noExpectedTypeOrError(expectedType) && !TypeUtils.isNullableType(expectedType)) {
return reportError(NULL_FOR_NONNULL_TYPE.on(expression, expectedType));
}
return false;