diff --git a/compiler/src/prog8/compiler/astprocessing/AstChecker.kt b/compiler/src/prog8/compiler/astprocessing/AstChecker.kt index 9342d4cc8..9d01593a9 100644 --- a/compiler/src/prog8/compiler/astprocessing/AstChecker.kt +++ b/compiler/src/prog8/compiler/astprocessing/AstChecker.kt @@ -958,11 +958,7 @@ internal class AstChecker(private val program: Program, } } - if(expr.operator in ComparisonOperators) { - if(leftDt!=rightDt && !(leftDt in ByteDatatypes && rightDt in ByteDatatypes)) { - throw FatalAstException("got comparison with different operand types: $leftDt ${expr.operator} $rightDt ${expr.position}") - } - } else { + if(expr.operator !in ComparisonOperators) { if (leftDt == DataType.STR && rightDt == DataType.STR || leftDt in ArrayDatatypes && rightDt in ArrayDatatypes) { // str+str and str*number have already been const evaluated before we get here. errors.err("no computational or logical expressions with strings or arrays are possible", expr.position)