diff --git a/sources/zweic/Analyzer.scala b/sources/zweic/Analyzer.scala index 2ae6212..ae4846d 100755 --- a/sources/zweic/Analyzer.scala +++ b/sources/zweic/Analyzer.scala @@ -268,10 +268,8 @@ val t1 = analyzeExpr(varScope, left); val t2 = analyzeExpr(varScope, right); if ( op == EQ || op == NE ) { - t1.lub(t2) match { - case None => + if (!( t1.isSubtype(t2) || t2.isSubtype(t1) )) { Report.error(tree.pos, "incompatible types: " + t1 + " <=> " + t2); - case _ => () } } else { checkIntType(left.pos, t1);