develooper Front page | perl.perl6.compiler | Postings from February 2018

[perl #131409] whatever auto closure fails with smartmatch withregex

Thread Previous
From:
Zoffix Znet via RT
Date:
February 2, 2018 11:37
Subject:
[perl #131409] whatever auto closure fails with smartmatch withregex
Message ID:
rt-4.0.24-12433-1517571437-485.131409-15-0@perl.org
On Wed, 31 May 2017 03:31:49 -0700, zengargoyle@gmail.com wrote:
> When using smartmatch against a regex, auto-whatever closure generation
> does not work whereas manual pointy closure does work.
> 
> A '{ * eq $match}' behaves differently than a '{ * ~~ /<$match>/}'.
> However, '-> $x { $x ~~ <$match>}' behaves as expected.
> 
> For a test case:
> https://gist.github.com/zengargoyle/5a14f01a35918f6c3391b90e9b85a22a
> 
> ----
> zengargoyle


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/d80fc376d201056
Test: https://github.com/perl6/roast/commit/323a2b65948f05d62

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About