correctly generate safe casts from Unit type

#KT-4494 fixed
This commit is contained in:
Dmitry Jemerov
2015-03-04 19:28:02 +01:00
parent 2835459920
commit 48b0afd84d
3 changed files with 16 additions and 0 deletions
@@ -3840,6 +3840,9 @@ The "returned" value of try expression with no finally is either the last expres
v.mark(nonnull);
}
}
else if (value.type == Type.VOID_TYPE) {
v.aconst(null);
}
else {
v.dup();
generateInstanceOfInstruction(rightType);