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

STD.pm expects <ws> before the '->' in a for statement, Rakudo doesn't #955

Closed
p6rt opened this issue Apr 28, 2009 · 5 comments
Closed

STD.pm expects <ws> before the '->' in a for statement, Rakudo doesn't #955

p6rt opened this issue Apr 28, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Apr 28, 2009

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

Searchable as RT65212$

@p6rt
Copy link
Author

p6rt commented Apr 28, 2009

From @masak

<masak> rakudo​: for (1..3)->$n {say $n}
<p6eval> rakudo e9f631​: OUTPUT«1␤2␤3␤»
<TimToady> bogus
<masak> hm, did I report that one already?
* masak checks
<TimToady> std​: for (1..3)->$n {say $n}
<p6eval> std 26533​: OUTPUT«##### PARSE FAILED #####␤Obsolete use of ->
to call a method; in Perl 6 please use . instead [...]
<masak> exactly.
<masak> hm, seems I didn't.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

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

@p6rt
Copy link
Author

p6rt commented Aug 16, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S04-statements/for.t

commit 906321ace70ba88535ce077b1b5f87478ea291f8
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sun Aug 16 04​:04​:31 2009 +0000

  [t/spec] Test for RT #​65212
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;28004 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S04-statements/for.t b/t/spec/S04-statements/for.t
index 8160538..69db878 100644
--- a/t/spec/S04-statements/for.t
+++ b/t/spec/S04-statements/for.t
@@ -11,7 +11,7 @@ for statement as possible
 
 =end description
 
-plan 56;
+plan 57;
 
 ## No foreach
 # L<S04/The C<for> statement/"no foreach statement any more">
@@ -440,6 +440,12 @@ eval_dies_ok('for(0..5) { }','keyword needs at least one whitespace after it');
   is $c, 6, 'infinte for loop ends in time using last';
 }
 
-  
+# RT #65212
+{
+    my $parsed = 0;
+    eval '$parsed = 1; for (1..3)->$n { last }';
+    #?rakudo todo 'RT #65212'
+    ok ! $parsed, 'for (1..3)->$n   fails to parse';
+}
 
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Apr 6, 2010

From @moritz

fixed in e54dc62b90a281b1223243dd64f4f77456aaf969.

@p6rt
Copy link
Author

p6rt commented Apr 6, 2010

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

@p6rt p6rt closed this as completed Apr 6, 2010
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