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

'...' form of stub code escapes 'try' statement in Rakudo #3083

Closed
p6rt opened this issue Mar 18, 2013 · 5 comments
Closed

'...' form of stub code escapes 'try' statement in Rakudo #3083

p6rt opened this issue Mar 18, 2013 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Mar 18, 2013

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

Searchable as RT117217$

@p6rt
Copy link
Author

p6rt commented Mar 18, 2013

From @masak

<diakopter> should try trap stub code executed?
<masak> rn​: try !!!; say "alive"
<p6eval> rakudo 2a41b3, niecza v24-35-g5c06e28​: OUTPUT«alive␤»
<masak> diakopter​: I don't see why not.
<diakopter> rn​: try ...; say "alive"
<p6eval> rakudo 2a41b3​: OUTPUT«Stub code executed␤current instr.​: 'throw' [...]
<p6eval> ..niecza v24-35-g5c06e28​: OUTPUT«alive␤»
<diakopter> rn​: try ???; say "alive"
<p6eval> rakudo 2a41b3​: OUTPUT«Stub code executed in block at
/tmp/fUkwbTNwFT​:1␤␤alive␤»
<p6eval> ..niecza v24-35-g5c06e28​: OUTPUT«alive␤»
<masak> I think neither ... nor ??? should emit anything.
<masak> aka Niecza is right twice.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Mar 18, 2013

From @masak

<jnthn> ??? should warn.
<jnthn> ... should fail
<jnthn> The fail leaks out of the try
<jnthn> er, or either way the fail is in sink context
<jnthn> a fail in sink context throws.
<jnthn> ??? is correct in Rakudo
<jnthn> ... is debatable there; I think the current spec says that try
sinks everything inside of it, in which case it shoulda sunk, failed
inside the try, and been quiet.
* masak adds jnthn's comments to the ticket
<TimToady> try only sinks the inside if the outside is sunk, otherwise
it's eager
<jnthn> TimToady​: oh...
<jnthn> masak​: So seems it's just try ... that is in question in Rakudo,
not ??? :)
<masak> nod.
<masak> I'll change the bug title too.
<TimToady> S04​:1000
<jnthn> *nod*

@p6rt
Copy link
Author

p6rt commented Mar 18, 2013

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

@p6rt
Copy link
Author

p6rt commented Apr 16, 2015

From @jnthn

On Mon Mar 18 13​:32​:39 2013, masak wrote​:

<diakopter> should try trap stub code executed?
<masak> rn​: try !!!; say "alive"
<p6eval> rakudo 2a41b3, niecza v24-35-g5c06e28​: OUTPUT«alive␤»
<masak> diakopter​: I don't see why not.
<diakopter> rn​: try ...; say "alive"
<p6eval> rakudo 2a41b3​: OUTPUT«Stub code executed␤current instr.​:
'throw' [...]
<p6eval> ..niecza v24-35-g5c06e28​: OUTPUT«alive␤»

This is now fixed, and tested in S04-statements/try.t.

@p6rt p6rt closed this as completed Apr 16, 2015
@p6rt
Copy link
Author

p6rt commented Apr 16, 2015

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

@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