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 returning from a method called from a hash lookup in Rakudo #1346

Closed
p6rt opened this issue Oct 6, 2009 · 5 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 6, 2009

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

Searchable as RT69610$

@p6rt
Copy link
Author

p6rt commented Oct 6, 2009

From @masak

<masak> ok. here comes today's groaner.
<masak> rakudo​: class A { method uhn() { say "alive"; return self; }
}; {"foo" => &A​::uhn}.<foo>(A.new)
<p6eval> rakudo f845cc​: OUTPUT«alive␤Null PMC access in find_method() [...]
* masak groans
<masak> the hash lookup, the 'return'. remove either and it works.
* masak submits rakudobug
<jnthn> Not even got any guesses at that one.
<masak> don't ask me how I find these.
<jnthn> Not sure I wanna know. :-P

@p6rt
Copy link
Author

p6rt commented Oct 23, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/integration/return-from-method-in-hash.t

commit 456b11e2d2a338ad59b61069680da1350ca32d91
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Fri Oct 23 03​:36​:49 2009 +0000

  [t/spec/integration] Test for RT #​69610
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;28889 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/integration/return-from-method-in-hash.t b/t/spec/integration/return-from-method-in-hash.t
new file mode 100644
index 0000000..55e20ce
--- /dev/null
+++ b/t/spec/integration/return-from-method-in-hash.t
@@ -0,0 +1,18 @@
+use v6;
+use Test;
+plan *;
+
+# RT #69610
+
+class RT69610 {
+    method rt69610() {
+        return self;
+    }
+}
+
+ok( { "foo" => &RT69610::rt69610 }.<foo>( RT69610.new ) ~~ RT69610,
+    "Can return from method called from a hash lookup (RT 69610)" );
+
+done_testing;
+
+# vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Oct 23, 2009

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

@p6rt
Copy link
Author

p6rt commented Oct 23, 2009

From @kyleha

On Tue Oct 06 15​:26​:23 2009, masak wrote​:

<masak> rakudo​: class A { method uhn() { say "alive"; return self; }
}; {"foo" => &A​::uhn}.<foo>(A.new)
<p6eval> rakudo f845cc​: OUTPUT«alive␤Null PMC access in find_method()
[...]

This now has a test, which passes, so I'm resolving it.

@p6rt
Copy link
Author

p6rt commented Oct 23, 2009

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

@p6rt p6rt closed this as completed Oct 23, 2009
@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