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?

> 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

Reply via email to