Add visitExpressionBody method to IrCompileTimeChecker

This method is needed to explicitly indicate that IrExpressionBody can
be interpreted in any evaluation mode.
This commit is contained in:
Ivan Kylchik
2021-02-03 15:03:11 +03:00
committed by Ilya Chernikov
parent e0297cf207
commit 77539fe2db
@@ -121,6 +121,11 @@ class IrCompileTimeChecker(
return visitStatements(body.statements, data)
}
// We need this separate method to explicitly indicate that IrExpressionBody can be interpreted in any evaluation mode
override fun visitExpressionBody(body: IrExpressionBody, data: Nothing?): Boolean {
return body.expression.accept(this, data)
}
override fun visitBlock(expression: IrBlock, data: Nothing?): Boolean {
return visitStatements(expression.statements, data)
}