| I've attached a patch that shows what a possible solution could look like. It adds an interface that allows custom numerical types to have a say in what type the arithmetic expression gets resolved to. Perhaps the solution could be even simpler with just a marker interface, since I expect that custom types would just resolve to themselves. |