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 block in loop fails at compile time #3267

Closed
p6rt opened this issue Nov 9, 2013 · 6 comments
Closed

CATCH block in loop fails at compile time #3267

p6rt opened this issue Nov 9, 2013 · 6 comments

Comments

@p6rt
Copy link

@p6rt p6rt commented Nov 9, 2013

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

Searchable as RT120498$

@p6rt
Copy link
Author

@p6rt p6rt commented Nov 9, 2013

From @lizmat

[18​:04​:02] <lizmat> r​: loop { CATCH { default { say "hi" } } }
[18​:04​:05] <+camelia> rakudo-parrot cab740​: OUTPUT«===SORRY!===␤Error while compiling op handle​: StopIteration␤»
[18​:04​:05] <+camelia> ..rakudo-jvm 882e33​: OUTPUT«===SORRY!===␤No such method 'jast' for invocant of type 'NQPMu'␤»
[18​:04​:26] <lizmat> these both seems LTA error messages
[18​:04​:38] <lizmat> should there be an error ?
[18​:04​:55] <jnthn> Looks like bug to me
[18​:05​:10] <jnthn> Shouldn't be an error at all
[18​:05​:20] <lizmat> that's what I thought
[18​:05​:49] <lizmat> r​: loop { { CATCH { default { say "hi" } } } ; last}
[18​:05​:52] <+camelia> rakudo-parrot cab740, rakudo-jvm 882e33​: ( no output )
[18​:06​:11] <lizmat> an extra block is a workaround, but shouldn't be needed, right ?
[18​:06​:18] <masak> shouldn't be needed.
[18​:06​:21] <masak> please submit.

@p6rt
Copy link
Author

@p6rt p6rt commented Nov 13, 2013

From @FROGGS

same problem with when/default in loops​:

<FROGGS> r​: my $i = 0; while $i++ < 2 { when 'hi' { } }
<camelia> rakudo-parrot 9f0609​: OUTPUT«===SORRY!===␤Error while compiling op handle​: StopIteration␤»
<camelia> ..rakudo-jvm 9f0609​: OUTPUT«===SORRY!===␤No such method 'jast' for invocant of type 'NQPMu'␤»

<FROGGS> r​: my $i = 0; while $i++ < 2 { default { } }
<camelia> rakudo-parrot 9f0609​: OUTPUT«===SORRY!===␤Error while compiling op handle​: StopIteration␤»
<camelia> ..rakudo-jvm 9f0609​: OUTPUT«===SORRY!===␤No such method 'jast' for invocant of type 'NQPMu'␤»

@p6rt
Copy link
Author

@p6rt p6rt commented Nov 13, 2013

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

@p6rt
Copy link
Author

@p6rt p6rt commented Jun 2, 2014

From @jnthn

On Wed Nov 13 14​:03​:09 2013, FROGGS.de wrote​:

same problem with when/default in loops​:

<FROGGS> r​: my $i = 0; while $i++ < 2 { when 'hi' { } }
<camelia> rakudo-parrot 9f0609​: OUTPUT«===SORRY!===␤Error while
compiling op handle​: StopIteration␤»
<camelia> ..rakudo-jvm 9f0609​: OUTPUT«===SORRY!===␤No such method
'jast' for invocant of type 'NQPMu'␤»

<FROGGS> r​: my $i = 0; while $i++ < 2 { default { } }
<camelia> rakudo-parrot 9f0609​: OUTPUT«===SORRY!===␤Error while
compiling op handle​: StopIteration␤»
<camelia> ..rakudo-jvm 9f0609​: OUTPUT«===SORRY!===␤No such method
'jast' for invocant of type 'NQPMu'␤»

These seem OK now​:

01​:33 < jnthn> r​: loop { CATCH { default { say 'hi' } } }
01​:34 <+camelia> rakudo-{parrot,jvm,moar} f99368​: OUTPUT«(timeout)»
01​:34 < jnthn> r​: my $i = 0; while $i++ < 2 { when 'hi' { } }
01​:34 <+camelia> rakudo-{parrot,jvm,moar} f99368​: ( no output )

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

@p6rt p6rt commented Sep 2, 2016

From @zoffixznet

Tests added in​:
CATCH​: Raku/roast@4ad2072a27
when​: Raku/roast@d5eda0dae8

@p6rt
Copy link
Author

@p6rt p6rt commented Sep 2, 2016

@zoffixznet - Status changed from 'open' 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