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

Namespaces don't work in class declarations #200

Closed
p6rt opened this issue Jul 29, 2008 · 5 comments
Closed

Namespaces don't work in class declarations #200

p6rt opened this issue Jul 29, 2008 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jul 29, 2008

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

Searchable as RT57388$

@p6rt
Copy link
Author

p6rt commented Jul 29, 2008

From johan.viklund@ebc.uu.se

Hi there, declaring classes in other namespaces except the toplevel
one results in "emtpy" classes (revision 29850).

This code​:

class Foo​::Bar { method foo {} }
my $b = Foo​::Bar.new;
$b.foo;

Gives this stacktrace

Method 'foo' not found for invocant of class 'Foo​::Bar'
current instr.​: '_block11' pc 55 (EVAL_13​:23)
called from Sub 'parrot;PCT​::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir​:481)
called from Sub 'parrot;PCT​::HLLCompiler;evalfiles' pc 1088
(src/PCT/HLLCompiler.pir​:610)
called from Sub 'parrot;PCT​::HLLCompiler;command_line' pc 1267
(src/PCT/HLLCompiler.pir​:699)
called from Sub 'parrot;Perl6​::Compiler;main' pc 14623 (perl6.pir​:172)

I guess that a test for this would be along the lines of

class Foo​::Bar { method foo {} }
my $b = Foo​::Bar.new;
lives_ok($b.foo);

--
Johan Viklund

@p6rt
Copy link
Author

p6rt commented Aug 7, 2008

From @jnthn

On Tue Jul 29 11​:27​:34 2008, johan.viklund@​ebc.uu.se wrote​:

Hi there, declaring classes in other namespaces except the toplevel
one results in "emtpy" classes (revision 29850).

This code​:

class Foo​::Bar { method foo {} }
my $b = Foo​::Bar.new;
$b.foo;

Gives this stacktrace

Method 'foo' not found for invocant of class 'Foo​::Bar'

Thanks for reporting; this is resolved in r30105.

Jonathan

@p6rt
Copy link
Author

p6rt commented Aug 7, 2008

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

@p6rt
Copy link
Author

p6rt commented Aug 7, 2008

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

@p6rt p6rt closed this as completed Aug 7, 2008
@p6rt
Copy link
Author

p6rt commented Aug 7, 2008

From @jnthn

On Tue Jul 29 11​:27​:34 2008, johan.viklund@​ebc.uu.se wrote​:

Hi there, declaring classes in other namespaces except the toplevel
one results in "emtpy" classes (revision 29850).

This code​:

class Foo​::Bar { method foo {} }
my $b = Foo​::Bar.new;
$b.foo;

Gives this stacktrace

Method 'foo' not found for invocant of class 'Foo​::Bar'

Thanks for reporting; this is resolved in r30105.

Jonathan

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

No branches or pull requests

1 participant