You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
p6rt
added
the
LTA
Less Than Awesome; typically an error message that could be better
label
Jan 5, 2020
Migrated from rt.perl.org#132146 (status was 'new')
Searchable as RT132146$
The text was updated successfully, but these errors were encountered: