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

LTA error with try and nonexistent private method #4425

Closed
p6rt opened this issue Jul 21, 2015 · 5 comments
Closed

LTA error with try and nonexistent private method #4425

p6rt opened this issue Jul 21, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jul 21, 2015

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

Searchable as RT125661$

@p6rt
Copy link
Author

p6rt commented Jul 21, 2015

From avuserow@gmail.com

16​:55 avuserow m​: class Foo {method bar () {try {self!wrong()}}}; my $f =
Foo.new; $f.bar;
16​:55 camelia rakudo-moar ef4de6​: OUTPUT«===SORRY!===␤Cannot find method
'orig'␤»

@p6rt
Copy link
Author

p6rt commented Jul 22, 2015

From @moritz

On Tue Jul 21 10​:15​:29 2015, avuserow@​gmail.com wrote​:

16​:55 avuserow m​: class Foo {method bar () {try {self!wrong()}}}; my $f =
Foo.new; $f.bar;
16​:55 camelia rakudo-moar ef4de6​: OUTPUT«===SORRY!===␤Cannot find method
'orig'␤»

Running this with --ll-exception reveals it as an optimizer bug​:

Cannot find method 'orig'
  at src/gen/m-Perl6-Optimizer.nqp​:296 (./blib/Perl6/Optimizer.moarvm​:add_exception​:18)
from src/gen/m-Perl6-Optimizer.nqp​:1452 (./blib/Perl6/Optimizer.moarvm​:optimize_private_method_call​:228)
from src/gen/m-Perl6-Optimizer.nqp​:1157 (./blib/Perl6/Optimizer.moarvm​:visit_op​:1133)

This is the code that dies​:

  method add_exception(@​name, $op, *%opts) {
  %opts<line> := HLL​::Compiler.lineof($op.node.orig, $op.node.from, :cache(1));
  %opts<modules> := $*W.p6ize_recursive(@​*MODULES);

Seems $op has no .node set.

@p6rt
Copy link
Author

p6rt commented Jul 22, 2015

From @moritz

On Tue Jul 21 10​:15​:29 2015, avuserow@​gmail.com wrote​:

16​:55 avuserow m​: class Foo {method bar () {try {self!wrong()}}}; my $f =
Foo.new; $f.bar;
16​:55 camelia rakudo-moar ef4de6​: OUTPUT«===SORRY!===␤Cannot find method
'orig'␤»

Fixed in commit 43a2cee, test added here​: Raku/roast@7502f61542

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Jul 22, 2015

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

@p6rt p6rt closed this as completed Jul 22, 2015
@p6rt
Copy link
Author

p6rt commented Jul 22, 2015

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant