On Tue, May 15, 2018 at 6:58 PM, Dan Book via RT <perlbug-followup@perl.org> wrote: > On Tue, 15 May 2018 15:42:34 -0700, simcop2387@simcop2387.info wrote: >> It might be useful to have this as a warning if it isn't already. I'd >> imagine that this isn't the expected result for most people. > > Probably reasonable to warn if any mathematical operation other than 0+ is done on a reference without overloads, if possible. > > -Dan That would be very helpful. This occurred in the middle of a rather hairy equation that wasn't producing an expected result. It wasn't easy to spot the missed dereference. Luckily the result was way off, so it was obvious something was wrong, but I can imagine situations where this could introduce some subtle but significant errors.Thread Previous | Thread Next