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

if() not parsed as sub call; should do, and emit a warning #1629

Closed
p6rt opened this issue Mar 25, 2010 · 5 comments
Closed

if() not parsed as sub call; should do, and emit a warning #1629

p6rt opened this issue Mar 25, 2010 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Mar 25, 2010

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

Searchable as RT73806$

@p6rt
Copy link
Author

p6rt commented Mar 25, 2010

From @moritz

10​:15 <@​moritz_> rakudo​: my @​b= 5, 1, 2; if(@​b>2) {say 'yes';}
10​:15 <+p6eval> rakudo db0f85​: OUTPUT«yes␤»
10​:15 <@​moritz_> WOAH THERE
10​:16 <@​moritz_> std​: my @​b= 5, 1, 2; if(@​b>2) {say 'yes';}
10​:16 <+p6eval> std 30196​: OUTPUT«===SORRY!===␤if() interpreted as function
  call at line 1; please use whitespace instead of
  parens␤Unexpected block in infix position (two terms in
a row)
10​:15 < cat> moiat /tmp/k2Uj3vzit0 line 1​:␤------> my @​b= 5, 1, 2; if(@​b>2)
  ⏏{say 'yes';}

Rakudo should follow STD here.

@p6rt
Copy link
Author

p6rt commented Aug 18, 2010

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

@p6rt
Copy link
Author

p6rt commented Mar 9, 2013

From @jnthn

On Thu Mar 25 02​:25​:10 2010, moritz wrote​:

10​:15 <@​moritz_> rakudo​: my @​b= 5, 1, 2; if(@​b>2) {say 'yes';}
10​:15 <+p6eval> rakudo db0f85​: OUTPUT«yes␤»
10​:15 <@​moritz_> WOAH THERE
10​:16 <@​moritz_> std​: my @​b= 5, 1, 2; if(@​b>2) {say 'yes';}
10​:16 <+p6eval> std 30196​: OUTPUT«===SORRY!===␤if() interpreted as
function
call at line 1; please use whitespace instead of
parens␤Unexpected block in infix position (two terms
in
a row)
10​:15 < cat> moiat /tmp/k2Uj3vzit0 line 1​:␤------> my @​b= 5, 1, 2;
if(@​b>2)
⏏{say 'yes';}

Rakudo should follow STD here.

It does now​:

my @​b= 5, 1, 2; if(@​b>2) {say 'yes';}
===SORRY!===
Word 'if' interpreted as 'if()' function call; please use whitespace
instead of parens
at <unknown file>​:1
------> my @​b= 5, 1, 2; if<HERE>(@​b>2) {say 'yes';}
Unexpected block in infix position (two terms in a row)
at <unknown file>​:1
------> my @​b= 5, 1, 2; if(@​b>2) <HERE>{say 'yes';}

Tagging testneeded; probably wants to get typed exceptions along the
way.

/jnthn

@p6rt
Copy link
Author

p6rt commented Aug 12, 2013

From @moritz

Tested (with a typed exception) in S32-exceptions/misc.t

@p6rt
Copy link
Author

p6rt commented Aug 12, 2013

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

@p6rt p6rt closed this as completed Aug 12, 2013
@p6rt p6rt added the testneeded label Jan 5, 2020
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