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

Zero-arg 'return' does not work with statement-modifier 'if' in rakudo #192

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

Zero-arg 'return' does not work with statement-modifier 'if' in rakudo #192

p6rt opened this issue Jul 27, 2008 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jul 27, 2008

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

Searchable as RT57334$

@p6rt
Copy link
Author

p6rt commented Jul 27, 2008

From @masak

$ svn info | grep Revi
Revision​: 29791

This works.

$ ./perl6 -e 'sub a { return }; say a()'

$ ./perl6 -e 'sub a { return 5 }; say a()'
5

This doesn't.

$ ./perl6 -e 'sub a { return if False; return 5 }; say a()'
Could not find non-existent sub if
current instr.​: 'a' pc 119 (EVAL_13​:45)
called from Sub '_block11' pc 17 (EVAL_13​:11)
called from Sub 'parrot;PCT​::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir​:481)
called from Sub 'parrot;PCT​::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir​:708)
called from Sub 'parrot;Perl6​::Compiler;main' pc 14567 (perl6.pir​:172)

@p6rt
Copy link
Author

p6rt commented Jul 27, 2008

From @pmichaud

This is because statement modifiers aren't yet recognized as
<stdstopper> in Rakudo's grammar yet. See #​57352.

@p6rt
Copy link
Author

p6rt commented Jul 27, 2008

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

@p6rt
Copy link
Author

p6rt commented Sep 15, 2008

From @pmichaud

Fixed in r31163, thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Sep 15, 2008

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

@p6rt p6rt closed this as completed Sep 15, 2008
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