Implicit cast support

This commit is contained in:
Michael Bogdanov
2016-09-23 17:02:46 +03:00
committed by Dmitry Petrov
parent 9609c8af90
commit a721876b67
@@ -359,8 +359,11 @@ class ExpressionCodegen(
coerce(expression.argument.asmType, Type.VOID_TYPE, mv)
return none()
}
IrTypeOperator.IMPLICIT_CAST -> {
gen(expression.argument, expression.typeOperand.asmType, data)
}
IrTypeOperator.CAST, IrTypeOperator.IMPLICIT_CAST, IrTypeOperator.SAFE_CAST -> {
IrTypeOperator.CAST, IrTypeOperator.SAFE_CAST -> {
val value = expression.argument.accept(this, data)
value.put(boxType(value.type), mv)
if (value.type === Type.VOID_TYPE) {