On Fri, Feb 27, 2009 at 02:21:59AM -0800, Vasily Chekalkin via RT wrote:
> On Wed Feb 25 00:49:42 2009, ml...@physik.uni-wuerzburg.de wrote:
> > 09:45 <@moritz_> rakudo: sub m (&f) { say "a" ~~ m/<f>/ }; regex outer {
> > a };
> >                  m(&a)
> > 09:45 < p6eval> rakudo 7f8ba6: OUTPUT«Null PMC access in isa()␤current
> > instr.:
> >                 '!SIGNATURE_BIND' pc 2559
> (src/classes/Signature.pir:377)␤»
> > 
> > note that there's no rule named 'a' defined.
> > 
> > A more helpful error message would be appropriate.
> 
> Patch available at 
> http://github.com/bacek/rakudo/commit/6a68c91cf0311df9472886caefef750fb2503df4

The patch conflates the concepts of "null" and "defined".
Instead of checking for a defined value, it should be checking
for a null value and doing the right thing after that.

This is also related to RT #62948, where null values appear
in arrays and other aggregates.  Instead of adding a bunch
of "is this value null" checks throughout the code, I'd 
prefer to look for a way to automatically promote nulls 
into undefs at the appropriate points.

Pm

Reply via email to