TypeCastException when casting null to T with nullable upper-bound

#KT-3637 Fixed
This commit is contained in:
Natalia.Ukhorskaya
2013-05-20 12:13:42 +04:00
parent 1bf06f7c02
commit a5f1a8b3f8
3 changed files with 37 additions and 2 deletions
@@ -3513,7 +3513,7 @@ The "returned" value of try expression with no finally is either the last expres
value.put(boxType(value.type), v);
if (opToken != JetTokens.AS_SAFE) {
if (!rightType.isNullable()) {
if (!CodegenUtil.isNullableType(rightType)) {
v.dup();
Label nonnull = new Label();
v.ifnonnull(nonnull);