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

Rakudo doesn't give a good indication of what's happened when an undeclared type is used in a 'when' clause #2410

Closed
p6rt opened this issue Apr 17, 2011 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Apr 17, 2011

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

Searchable as RT88748$

@p6rt
Copy link
Author

p6rt commented Apr 17, 2011

From @masak

<masak> rakudo​: given 42 { when SomeUndeclaredType { say "OH HAI" };
default { say "OH NOES" } }
<p6eval> rakudo 5ac05e​: OUTPUT«===SORRY!===␤Missing block at line 22,
near "; default "␤»
<masak> std​: given 42 { when SomeUndeclaredType { say "OH HAI" };
default { say "OH NOES" } }
<p6eval> std 4608239​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Function
'SomeUndeclaredType' needs parens to avoid gobbling block at
/tmp/ggW4TXS4y1 line 1​:␤------> �[32mgiven 42 { when
SomeUndeclaredType�[33m⏏�[31m { say "OH HAI" }; default { say "OH
NOE�[0m␤Missing block (apparently gobbled by 'SomeUndeclaredType'…
<masak> I like STD's error messages much better here.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Feb 26, 2014

From @coke

No change in behavior

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Sep 3, 2014

From @perlpilot

Seems to use STD's message now​:

14​:02 <PerlJam> rakudo​: given 42 { when SomeUndeclaredType { say "OH HAI" }; default { say "OH NOES" } }
14​:02 <camelia> rakudo-{parrot,jvm,moar} 41d7f7​: OUTPUT«===SORRY!===␤Function SomeUndeclaredType needs parens to avoid gobbling block␤at /tmp/tmpfile​:1␤------> when SomeUndeclaredType { say "OH HAI" }⏏; default { say "OH NOES" } }␤Missing block (appare…»

-Scott

@p6rt
Copy link
Author

p6rt commented Oct 14, 2014

From @usev6

As it was noted recently, Rakudo now gives the same error message as STD.

I added a test to S32-exceptions/misc.t with the following commit​: Raku/roast@7396503e24 and I'm closing the ticket.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 14, 2014

From @usev6

As it was noted recently, Rakudo now gives the same error message as STD.

I added a test to S32-exceptions/misc.t with the following commit​: Raku/roast@7396503e24 and I'm closing the ticket.

@p6rt
Copy link
Author

p6rt commented Oct 14, 2014

@usev6 - Status changed from 'new' to 'resolved'

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

No branches or pull requests

1 participant