Re: [perl #3270] No check whether operators are overloaded to lvalue functions.

The general case that this ticket is about cannot be reasonably made to
work as requested.  Overloaded operators are resolved at runtime, so it
is impossible to determine at compile time whether an lvalue method would
be called.  The only way to permit the lvalue method to be called and
let the assignment succeed would be to abolish all compile-time checking
of lvalueness for any operator that is capable of being overloaded, and
introduce runtime checks for lvalue context into the implementation of
each of those operators.  Either of these downsides would be prohibitive,
and they are certainly not worth it in order to permit a very rare and
dubious application of overloading.

This ticket should be closed.  The meta ticket [perl #89650], which
depends on this ticket, can also be closed.

11/14/2017 8:42:30 PM
perl.perl5.porters 47173 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 34