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:
committed by
Ilya Chernikov
parent
e0297cf207
commit
77539fe2db
+5
@@ -121,6 +121,11 @@ class IrCompileTimeChecker(
|
|||||||
return visitStatements(body.statements, data)
|
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 {
|
override fun visitBlock(expression: IrBlock, data: Nothing?): Boolean {
|
||||||
return visitStatements(expression.statements, data)
|
return visitStatements(expression.statements, data)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user