translator: fix block in when expression

This commit is contained in:
e5l
2016-08-16 13:13:37 +03:00
parent b3b7bdaa86
commit 888ead72e2
@@ -84,6 +84,10 @@ abstract class BlockCodegen(val state: TranslationState, val variableManager: Va
fun evaluateExpression(expr: PsiElement?, scopeDepth: Int): LLVMSingleValue? {
return when (expr) {
is KtBlockExpression -> {
expressionWalker(expr.firstChild, scopeDepth + 1)
return null
}
is KtBinaryExpression -> evaluateBinaryExpression(expr, scopeDepth)
is KtPostfixExpression -> evaluatePostfixExpression(expr, scopeDepth)
is KtPrefixExpression -> evaluatePrefixExpression(expr, scopeDepth)