Skip Menu |
Report information
Id: 132146
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [LTA] Consistency of `&` coercer
Download (untitled) / with headers
text/plain 744b
IRC: https://irclog.perlgeek.de/perl6/2017-09-22#i_15205100 If you give the `&` coercer some stuff that isn't a callable it just gives you the stuff back. However, if the "stuff" you give is a sigil-less constant, it gives a Nil. Yet, if you parenthesize that constant, you do get its actual value: 22:13 Zoffix m: constant $z = 42; say &$z 22:13 camelia rakudo-moar ffd179: OUTPUT: «42␤» 22:14 Zoffix m: constant z = 42; say &z 22:14 camelia rakudo-moar ffd179: OUTPUT: «Nil␤» 22:14 Zoffix inconsistent 22:14 m: constant z = 42; say &(z) 22:14 camelia rakudo-moar ffd179: OUTPUT: «42␤» Feels like the Nil version needs to either return the actual value or throw; not silently return the wrong value.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org