Skip Menu |
Report information
Id: 114388
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: jimmy.zhuo [at] gmail.com
Cc:
AdminCc:

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



Subject: LAT error when using s[] = "rea"
Date: Sat, 4 Aug 2012 16:38:21 +0800
To: <rakudobug [...] perl.org>
From: "Jimmy Zhuo" <jimmy.zhuo [...] gmail.com>
Download (untitled) / with headers
text/plain 695b
JimmyZ_ r: s[ea] = "rea"; .say p6eval rakudo 1f662c: OUTPUT«No such method 'subst' for invocant of type 'Any'␤ in block at /tmp/htGuR5us8T:1␤␤» masak sorear: \o JimmyZ_ r: $_ = ""; s[ ] = "rea"; .say p6eval rakudo 1f662c: OUTPUT«rea␤» JimmyZ_ r: $_ = ""; s[] = "rea"; .say p6eval rakudo 1f662c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter ] (must be quoted to match literally) at line 2, near " = \"rea\"; "␤» JimmyZ_ std: $_ = ""; s[ ] = "rea"; .say p6eval std f43a358: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/VK1jegzuR7 line 1:␤------> $_ = ""; s[ ⏏] = "rea"; .say␤ expecting quantifier␤Parse failed␤FAILED 00:00 43m␤» --- Jimmy Zhuo
Subject: Re: [perl #114388] LAT error when using s[] = "rea"
Date: Sat, 04 Aug 2012 11:12:02 +0200
To: perl6-compiler [...] perl.org
From: Moritz Lenz <moritz [...] faui2k3.org>
Download (untitled) / with headers
text/plain 1.1k
On 08/04/2012 10:38 AM, Jimmy Zhuo (via RT) wrote: Show quoted text
> # New Ticket Created by "Jimmy Zhuo" > # Please include the string: [perl #114388] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=114388 > > > > JimmyZ_ r: s[ea] = "rea"; .say > p6eval rakudo 1f662c: OUTPUT«No such method 'subst' for invocant of type 'Any'␤ in block at /tmp/htGuR5us8T:1␤␤»
What would you expect? The spec says that s[] desugars to a call to 'subst', so I consider it correct. We could improve the error, but what should it say? Show quoted text
> JimmyZ_ r: $_ = ""; s[ ] = "rea"; .say > p6eval rakudo 1f662c: OUTPUT«rea␤» > JimmyZ_ r: $_ = ""; s[] = "rea"; .say > p6eval rakudo 1f662c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter ] (must be quoted to match literally) at line 2, near " = \"rea\"; "␤» > JimmyZ_ std: $_ = ""; s[ ] = "rea"; .say > p6eval std f43a358: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/VK1jegzuR7 line 1:␤------> $_ = ""; s[ ⏏] = "rea"; .say␤ expecting quantifier␤Parse failed␤FAILED 00:00 43m␤»
I'm pretty sure we have a separate ticket for that. Cheers, Moritz
Download (untitled) / with headers
text/plain 868b
在 2012-08-04 02:12:41 星期六 时,moritz 写到: Show quoted text
> > > On 08/04/2012 10:38 AM, Jimmy Zhuo (via RT) wrote:
> > # New Ticket Created by "Jimmy Zhuo" > > # Please include the string: [perl #114388] > > # in the subject line of all future correspondence about this issue. > > # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=114388 > > > > > > > JimmyZ_ r: s[ea] = "rea"; .say > > p6eval rakudo 1f662c: OUTPUT«No such method 'subst' for invocant of
> type 'Any'␤ in block at /tmp/htGuR5us8T:1␤␤» > > What would you expect? > The spec says that s[] desugars to a call to 'subst', so I consider it > correct. We could improve the error, but what should it say? >
I don't know, but std outputs: JimmyZ std: s[ea] = "rea"; .say p6eval std f43a358: OUTPUT«Can't bless non-reference value at CursorBase.pm line 1163.␤FAILED 00:00 41m␤»
Download (untitled) / with headers
text/plain 1024b
On Sun Aug 05 04:53:55 2012, jimmy wrote: Show quoted text
> 在 2012-08-04 02:12:41 星期六 时,moritz 写到:
> > > > > > On 08/04/2012 10:38 AM, Jimmy Zhuo (via RT) wrote:
> > > # New Ticket Created by "Jimmy Zhuo" > > > # Please include the string: [perl #114388] > > > # in the subject line of all future correspondence about this issue. > > > # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=114388 > > > > > > > > > > JimmyZ_ r: s[ea] = "rea"; .say > > > p6eval rakudo 1f662c: OUTPUT«No such method 'subst' for invocant of
> > type 'Any'␤ in block at /tmp/htGuR5us8T:1␤␤» > > > > What would you expect? > > The spec says that s[] desugars to a call to 'subst', so I consider it > > correct. We could improve the error, but what should it say? > >
> > I don't know, but std outputs: > > JimmyZ std: s[ea] = "rea"; .say > p6eval std f43a358: OUTPUT«Can't bless non-reference value at > CursorBase.pm line 1163.␤FAILED 00:00 41m␤»
Which is even less useful, because it's an internal error from STD
Download (untitled) / with headers
text/plain 923b
On Sa. 04. Aug. 2012, 01:38:44, jimmy.zhuo@gmail.com wrote: Show quoted text
> JimmyZ_ r: s[ea] = "rea"; .say > p6eval rakudo 1f662c: OUTPUT«No such method 'subst' for invocant of > type 'Any'␤ in block at /tmp/htGuR5us8T:1␤␤»
Maybe it should mention $_ somewhere, since it tries to call subst on $_. <FROGGS> r: $_ = "real"; s[ea] = "rea"; .say <p6eval> rakudo 4fb07b: OUTPUT«rreal␤» Show quoted text
> JimmyZ_ r: $_ = ""; s[] = "rea"; .say > p6eval rakudo 1f662c: OUTPUT«===SORRY!===␤Unrecognized regex > metacharacter ] (must be quoted to match literally) at line 2, near " > = \"rea\"; "␤»
<FROGGS> r: $_ = ""; s[] = "rea"; .say <p6eval> rakudo 4fb07b: OUTPUT«===SORRY!===␤Null regex not allowed␤at /tmp/RMeRW9M9Mh:1␤------> $_ = ""; s[⏏] = "rea"; .say␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ statement end␤ statement modifie… This is right IMO.
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 437b
All those evaluations look good to me now: $ perl6 -e 's[ea] = "rea"; .say; .perl.say' "" $ perl6 -e '$_ = "real"; s[ea] = "rea"; .say' rreal $ perl6-m -e '$_ = ""; s[] = "rea"' ===SORRY!=== Error while compiling -e Null regex not allowed at -e:1 ------> $_ = ""; s[⏏] = "rea" I added tests for those to S05-substitution/subst.t with commit https://github.com/perl6/roast/commit/78780eee60. I'm closing this ticket as 'resolved'.
Subject: LTA error when using s[] = "rea"
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 393b
The first evaluation fails again (no method 'subst-mutate' nowadays), so I'm re-opening this ticket. $ perl6 -e 's[ea] = "rea";' Method 'subst-mutate' not found for invocant of class 'Any' in block <unit> at -e:1 We're back to "We could improve the error, but what should it say" (moritz, 2012) and "Maybe it should mention $_ somewhere, since it tries to call subst on $_" (FROGGS, 2013).
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 721b
On Fri Apr 17 03:58:32 2015, bartolin@gmx.de wrote: Show quoted text
> The first evaluation fails again (no method 'subst-mutate' nowadays), > so I'm re-opening this ticket. > > $ perl6 -e 's[ea] = "rea";' > Method 'subst-mutate' not found for invocant of class 'Any' > in block <unit> at -e:1 > > We're back to "We could improve the error, but what should it say" > (moritz, 2012) and "Maybe it should mention $_ somewhere, since it > tries to call subst on $_" (FROGGS, 2013).
Message changed again: 13:40 < [Coke]> m: s[ea] = "rea"; # RT #114388 13:40 < camelia> rakudo-moar af4c2e: OUTPUT«Method 'match' not found for invocant of class 'Any'␤ in block <unit> at <tmp> line 1␤␤» -- Will "Coke" Coleda


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