Fix incorrect condition in CheckIrElementVisitor.ensureTypeIs

Apparently it has no effect on behavior of tests because no backend uses
the checkTypes mode of IR validation
This commit is contained in:
Alexander Udalov
2019-04-01 19:21:10 +02:00
parent 26a9b2b251
commit bdfe82cfff
@@ -53,8 +53,7 @@ class CheckIrElementVisitor(
if (!config.checkTypes)
return
// TODO: compare IR types instead.
if (expectedType.isEqualTo(type)) {
if (!expectedType.isEqualTo(type)) {
reportError(this, "unexpected expression.type: expected $expectedType, got ${type.render()}")
}
}