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 or imcc syntax error for non-our package or any package not in sink context in Rakudo #1710

Closed
p6rt opened this issue Apr 22, 2010 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Apr 22, 2010

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

Searchable as RT74592$

@p6rt
Copy link
Author

p6rt commented Apr 22, 2010

From @masak

<ash_> rakudo​: my $x = package {...}
<p6eval> rakudo 7d43ee​: OUTPUT«error​:imcc​:syntax error, unexpected ')'
(')') [...]
* masak submits rakudobug
<masak> rakudo​: package {}
<p6eval> rakudo 7d43ee​: ( no output )
<masak> rakudo​: my $x = package Foo {}
<p6eval> rakudo 7d43ee​: OUTPUT«Null PMC access in can() [...]
<masak> ooh, two in one!
<jnthn> Well, same underlying issue
<jnthn> Because I know that Rakudo has no concept of non-our package
<masak> rakudo​: my $x = our package { ... }
<p6eval> rakudo 7d43ee​: OUTPUT«error​:imcc​:syntax error, unexpected ')'
(')') [...]
<jnthn> That should complain that an our-scoped package should have a
name, I guess.
<masak> rakudo​: my $x = our package Foo { ... }
<p6eval> rakudo 7d43ee​: OUTPUT«error​:imcc​:syntax error, unexpected ')'
(')') [...]
<masak> and that one?
<jnthn> To clarify what I wrote before
<jnthn> Rakudo has no concept of non-our package or any package not in
sink context.
<masak> ah.
<jnthn> class and role do know what to do.
<jnthn> In such cirumstances.

@p6rt
Copy link
Author

p6rt commented Aug 12, 2010

@coke - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 23, 2011

From @coke

On Thu Apr 22 16​:50​:53 2010, masak wrote​:

<ash_> rakudo​: my $x = package {...}
<p6eval> rakudo 7d43ee​: OUTPUT�error​:imcc​:syntax error, unexpected
')'
(')') [...]
* masak submits rakudobug
<masak> rakudo​: package {}
<p6eval> rakudo 7d43ee​: ( no output )
<masak> rakudo​: my $x = package Foo {}
<p6eval> rakudo 7d43ee​: OUTPUT�Null PMC access in can() [...]
<masak> ooh, two in one!
<jnthn> Well, same underlying issue
<jnthn> Because I know that Rakudo has no concept of non-our package
<masak> rakudo​: my $x = our package { ... }
<p6eval> rakudo 7d43ee​: OUTPUT�error​:imcc​:syntax error, unexpected
')'
(')') [...]
<jnthn> That should complain that an our-scoped package should have a
name, I guess.
<masak> rakudo​: my $x = our package Foo { ... }
<p6eval> rakudo 7d43ee​: OUTPUT�error​:imcc​:syntax error, unexpected
')'
(')') [...]
<masak> and that one?
<jnthn> To clarify what I wrote before
<jnthn> Rakudo has no concept of non-our package or any package not in
sink context.
<masak> ah.
<jnthn> class and role do know what to do.
<jnthn> In such cirumstances.

These all look more reasonable now​:

my $x = package {...}
The following packages were stubbed but not defined​:
  <anon>

package {}
<anon>()
my $x = package Foo {}
Foo()
my $x = our package { ... }
The following packages were stubbed but not defined​:
  <anon>

my $x = our package Foo { ... }
The following packages were stubbed but not defined​:
  Foo

Tests needed.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 2, 2013

From @moritz

tested in S10-packages/basic.t

@p6rt
Copy link
Author

p6rt commented Jan 2, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant