Community
Participate
Working Groups
Define arithmetic operators for all kind of numbers including primitives and their wrappers as well as BigInteger and BigDecimal. The primitive versions should be overloaded for the most commonly used cases. IntegerExtensions needs methods for other Java operators like shifting.
Integer and Double pushed to MASTER. Now heading for BigInteger and BigDecimal
Bound the following operators ! && || == != for (boolean, boolean) - + ** * / % || && == != < <= > >= ! for (int, int) and (Integer, Number) - + ** * / % || && == != < <= > >= ! .. for (Integer, Number) - + ** * / == != < <= > >= for (double, double) - + ** * / for (Double, Number) - + ** * / for (BigDecimal, BigDecimal) - + ** * / % || && ! for (BigInteger, BigInteger) Into the bargain, I've added the shift operators from Java as methods. For the Object types, there is no need to override the default Comparable binding, as long as we don't plan to support comparing e.g. Double to BigInteger transparently. I've skipped char, byte, short and float in this first shot. I've also skipped mixed primitve operations like int+double.
Pushed to MASTER
Found a problem with autoboxing. Generated Java code doesn't comple, because operator_plus(new Integer(a), 1) is ambiguos.
The XbaseCompiler now explicitly boxes and unboxes primitives and their wrappers. Also converted bit operations on integer types into methods which are more suggestive to non-mathematicians ;-)
Closing all bugs that were set to RESOLVED before Neon.0