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:
+1
-2
@@ -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()}")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user