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

Failure of operators after parenthesis-less sub calls #4996

Open
p6rt opened this issue Jan 5, 2016 · 1 comment
Open

Failure of operators after parenthesis-less sub calls #4996

p6rt opened this issue Jan 5, 2016 · 1 comment
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 5, 2016

Migrated from rt.perl.org#127163 (status was 'new')

Searchable as RT127163$

@p6rt
Copy link
Author

p6rt commented Jan 5, 2016

From @zoffixznet

The code is worth a 1000 words, so see evals below. The issue is or/and/andthen after a sub call without parenthesis give an error that or/and/andthen are not defined subs. With || the issue does not see to appear, while with && we get a TTIR​:

<Zoffix> m​: fail or fail;
<camelia> rakudo-moar ac4f9f​: OUTPUT«===SORRY!=== Error while compiling /tmp/IfSQFv7yVR␤Undeclared routine​:␤ or used at line 1␤␤»
<Zoffix> m​: fail() or fail;
<camelia> rakudo-moar ac4f9f​: OUTPUT«Failed␤ in block <unit> at /tmp/i553uhRVXy line 1␤␤»
<Zoffix> m​: fail and fail;
<camelia> rakudo-moar ac4f9f​: OUTPUT«===SORRY!=== Error while compiling /tmp/J8RuBepwj2␤Undeclared routine​:␤ and used at line 1. Did you mean 'rand', 'any', 'end'?␤␤»
<Zoffix> m​: fail() and fail;
<camelia> rakudo-moar ac4f9f​: OUTPUT«Failed␤ in block <unit> at /tmp/Qcy6ni8Yl2 line 1␤␤»
<Zoffix> m​: fail || fail;
<camelia> rakudo-moar ac4f9f​: OUTPUT«Failed␤ in block <unit> at /tmp/u5LL5QACth line 1␤␤»
<Zoffix> m​: fail && fail;
<camelia> rakudo-moar ac4f9f​: OUTPUT«===SORRY!=== Error while compiling /tmp/P21srEsUth␤Two terms in a row␤at /tmp/P21srEsUth​:1␤------> fail &&⏏ fail;␤ expecting any of​:␤ infix␤ infix stopper␤ postfix␤ statement end␤ state…»
<Zoffix> m​: fail() && fail;
<camelia> rakudo-moar ac4f9f​: OUTPUT«Failed␤ in block <unit> at /tmp/Om2MctCB1k line 1␤␤»
<Zoffix> m​: fail andthen fail;
<camelia> rakudo-moar ac4f9f​: OUTPUT«===SORRY!=== Error while compiling /tmp/YfoH1FxSAN␤Undeclared routine​:␤ andthen used at line 1␤␤»
<Zoffix> m​: fail() andthen fail;
<camelia> rakudo-moar ac4f9f​: OUTPUT«Failed␤ in block <unit> at /tmp/IBwL8yFoGX line 1␤␤»

@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