public static void init() { Add.init(); Address.init(); Align.init(); Alloc.init(); Anchor.init(); And.init(); Bad.init(); Bitcast.init(); Block.init(); Builtin.init(); Call.init(); Cmp.init(); Cond.init(); Confirm.init(); Const.init(); Conv.init(); CopyB.init(); Deleted.init(); Div.init(); Dummy.init(); End.init(); Eor.init(); Free.init(); IJmp.init(); Id.init(); Jmp.init(); Load.init(); Member.init(); Minus.init(); Mod.init(); Mul.init(); Mulh.init(); Mux.init(); NoMem.init(); Not.init(); Offset.init(); Or.init(); Phi.init(); Pin.init(); Proj.init(); Raise.init(); Return.init(); Sel.init(); Shl.init(); Shr.init(); Shrs.init(); Size.init(); Start.init(); Store.init(); Sub.init(); Switch.init(); Sync.init(); Tuple.init(); Unknown.init(); }
@Override public Boolean visit(Mul ast) { boolean checkLhs = ast.getLhs().accept(this); boolean checkRhs = ast.getRhs().accept(this); if (!(checkLhs && checkRhs)) return false; Type lhsType = ast.getLhs().typeOf(env); Type rhsType = ast.getRhs().typeOf(env); if (!(lhsType.isCompatibleToNumeric() && rhsType.isCompatibleToNumeric())) { addToErrorList( ast, "the operator * can not be applied to instances of type " + lhsType.getClass() + " and type " + rhsType.getClass()); return false; } return true; }