KT-2466 "When" on boolean produces VerifyError

#KT-2466 Fixed
This commit is contained in:
Alexander Udalov
2012-07-19 21:12:58 +04:00
parent 98efc0276a
commit db008d5d38
3 changed files with 14 additions and 1 deletions
@@ -2855,7 +2855,7 @@ The "returned" value of try expression with no finally is either the last expres
boolean patternIsNullable = false;
JetType condJetType = bindingContext.get(BindingContext.EXPRESSION_TYPE, condExpression);
Type condType;
if (isNumberPrimitive(subjectType)) {
if (isNumberPrimitive(subjectType) || subjectType.getSort() == Type.BOOLEAN) {
condType = asmType(condJetType);
}
else {