Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null PMC access when calling Grammar.WALK in Rakudo #1038

Closed
p6rt opened this issue Jun 5, 2009 · 5 comments
Closed

Null PMC access when calling Grammar.WALK in Rakudo #1038

p6rt opened this issue Jun 5, 2009 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 5, 2009

Migrated from rt.perl.org#66330 (status was 'resolved')

Searchable as RT66330$

@p6rt
Copy link
Author

p6rt commented Jun 5, 2009

From @masak

<jnthn> rakudo​: my ($meth) = Grammar.WALK(​:name<parse>);
$meth(Perl6​::Grammar.new, '42')
<p6eval> rakudo 10a9b2​: OUTPUT«Null PMC access in find_method()␤in
method Perl6Object​::WALK (src/gen_setting.pm​:3207) [...]
<jnthn> Eww.
<jnthn> OK, oddness.
* masak submits rakudobug
<Matt-W> aah the first masakbug of the day

@p6rt
Copy link
Author

p6rt commented Jun 20, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S12-introspection/walk.t

commit cc81d63c2c6fd91dd85c16c45c0862fd2a26f040
Author​: jnthn <jnthn@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sun Jun 20 11​:52​:34 2010 +0000

  [t/spec] Add a test for RT#​66330 to walk.t. Also tweak a couple of tests that won't quite work; things passed into :omit and :include need to be a little more careful since they'll be invoked with Mu at some point, which in this case didn't end too well.
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31391 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S12-introspection/walk.t b/t/spec/S12-introspection/walk.t
index 8737870..c83c50d 100644
--- a/t/spec/S12-introspection/walk.t
+++ b/t/spec/S12-introspection/walk.t
@@ -2,7 +2,7 @@ use v6;
 
 use Test;
 
-plan 10;
+plan 11;
 
 =begin pod
 
@@ -91,17 +91,21 @@ sub cand_order(@cands, $instance) {
 # :include
 {
     my $x = E.new;
-    my @cands = $x.WALK(:name<m>, :include(regex { <[CDE]> }));
-    #?rakudo skip ':include fails'
+    my @cands = $x.WALK(:name<m>, :include({ ~$^c ~~ regex { <[CDE]> } }));
     is cand_order(@cands, $x), 'ECD', ':include works';
 }
 
 # :include and :omit
 {
     my $x = E.new;
-    my @cands = $x.WALK(:name<m>, :include(regex { <[CDE]> }), :omit({ .^can('n') }));
-    #?rakudo skip ':include/:omit together fail'
+    my @cands = $x.WALK(:name<m>, :include({ ~$^c ~~ regex { <[CDE]> } }), :omit({ .^can('n') }));
     is cand_order(@cands, $x), 'D', ':include and :omit together work';
 }
 
+# Grammar.WALK had issues once
+{
+    my ($meth) = Grammar.WALK(:name<parse>);
+    is $meth.name, 'parse', 'Grammar.WALK works';
+}
+
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Jun 20, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 20, 2010

From @jnthn

On Fri Jun 05 03​:05​:41 2009, masak wrote​:

<jnthn> rakudo​: my ($meth) = Grammar.WALK(​:name<parse>);
$meth(Perl6​::Grammar.new, '42')
<p6eval> rakudo 10a9b2​: OUTPUT«Null PMC access in find_method()␤in
method Perl6Object​::WALK (src/gen_setting.pm​:3207) [...]
<jnthn> Eww.
<jnthn> OK, oddness.
* masak submits rakudobug
<Matt-W> aah the first masakbug of the day

Works now​:

my ($meth) = Grammar.WALK(​:name<parse>); say $meth.name;
parse

And added a test to walk.t, so resolving.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Jun 20, 2010

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jun 20, 2010
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant