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

CATCH{} inside &postcircumfix:<{ }> emits broken PIR #2298

Closed
p6rt opened this issue Dec 16, 2010 · 5 comments
Closed

CATCH{} inside &postcircumfix:<{ }> emits broken PIR #2298

p6rt opened this issue Dec 16, 2010 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 16, 2010

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

Searchable as RT80864$

@p6rt
Copy link
Author

p6rt commented Dec 16, 2010

From @masak

Bug stems from tweet <http://twitter.com/VienosNotes/status/15077070396727296>

<masak> rakudo​: try{CATCH {say "caught";}}
<p6eval> rakudo a95c1d​: OUTPUT«error​:imcc​:syntax error, unexpected ')'
(')')␤ in file 'EVAL_10' line 84422894␤===SORRY!===␤syntax error
... somewhere␤»
* masak submits rakuodbug
<masak> rakudo​: try{}
<p6eval> rakudo a95c1d​: OUTPUT«Could not find sub &try␤ in main
program body at line 22​:/tmp/OOKCmOQamA␤»
<masak> rakudo​: try{CATCH{}}
<p6eval> rakudo a95c1d​: OUTPUT«error​:imcc​:syntax error, unexpected ')'
(')')␤ in file 'EVAL_10' line 44790886␤===SORRY!===␤syntax error
... somewhere␤»
<masak> std​: try{CATCH {}}
<p6eval> std 01ab3ab​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Undeclared
routine​:␤ 'try' used at line 1␤Check failed␤FAILED 00​:01 118m␤»
<masak> right, so it's not syntactically correct in the first place.
<masak> but Rakudo could give a more awesome error indicating that.

@p6rt
Copy link
Author

p6rt commented Dec 16, 2010

From @masak

<uasi> rakudo​: my %a; %a{ CATCH{} }
<p6eval> rakudo a95c1d​: OUTPUT«error​:imcc​:syntax error, unexpected ')' (')')␤ in file 'EVAL_10'
line 49267820␤===SORRY!===␤syntax error ... somewhere␤»
* masak submits rakudobug
<masak> it's the same error, but as far as I'm concerned, that's a different area.
<masak> hm. wait.
<uasi> CATCH{} inside &postcircumfix​:<{ }> emits broken PIR
<moritz_> it's the same. CATCH in subscript
<masak> moritz_​: well, you said 'try' was a funcall.
<masak> moritz_​: then that case is a subscript too.
* masak renames the ticket instead
<masak> uasi++

@p6rt
Copy link
Author

p6rt commented Dec 16, 2010

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

@p6rt
Copy link
Author

p6rt commented Oct 26, 2011

From @moritz

Works now, tested in S04-exception-handlers/catch.t

@p6rt
Copy link
Author

p6rt commented Oct 26, 2011

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

@p6rt p6rt closed this as completed Oct 26, 2011
@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