# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev
# Please include the string: [perl #130517]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=130517 >
Code:
say { 0 => 1, 1 => 0 }.max(:by(*.value))
Result:
1 => 0
Code:
say { 0 => 1, 1 => 0 }.max(*.value)
Result:
0 => 1
I think :by(…) is something people commonly try (somebody did this on camelia,
and I remember doing this myself), so it would be great if it could warn the
user.