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

No-args 'print' and 'say' (without explicit parentheses) should generate a warning in Rakudo #1509

Closed
p6rt opened this issue Feb 15, 2010 · 9 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 15, 2010

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

Searchable as RT72844$

@p6rt
Copy link
Author

p6rt commented Feb 15, 2010

From @masak

<masak> std​: say
<p6eval> std 29734​: OUTPUT«Potential difficulties​:␤ Unsupported use
of bare 'say'; [...] ok 00​:01 107m␤»
<masak> rakudo​: say
<p6eval> rakudo 70667a​: OUTPUT«␤»
* masak submits rakudobug
<masak> std​: print
<p6eval> std 29734​: OUTPUT«Potential difficulties​:␤ Unsupported use
of bare 'print'; [...] ok 00​:01 105m␤»
<masak> rakudo​: print
<p6eval> rakudo 70667a​: ( no output )

STD generates a warning for these cases, but Rakudo doesn't.

@p6rt
Copy link
Author

p6rt commented Mar 20, 2010

From @masak

<masak> rakudo​: say for 1..3
<p6eval> rakudo e759b5​: OUTPUT«␤␤␤»
* masak submits rakudobug
<masak> std​: say for 1..3
<p6eval> std 30138​: OUTPUT«Potential difficulties​:␤ Unsupported use
of bare 'say'; in Perl 6 please use .say if you meant $_, or use an
explicit invocant or argument [...] ok 00​:01 106m␤»
<jnthn> masak​: I hope you expected that to fail to compile :-)
<masak> jnthn​: no, why?
<jnthn> masak​: oh, std only says it's a "potential difficulty" :-/
<jnthn> It used to be an error.
<jnthn> :-/
<masak> it used to, yes.

@p6rt
Copy link
Author

p6rt commented Aug 12, 2010

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

1 similar comment
@p6rt
Copy link
Author

p6rt commented Aug 18, 2010

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

@p6rt
Copy link
Author

p6rt commented Oct 8, 2011

From @coke

Still no errors or warnings in rakudo 88c5a5.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Aug 27, 2014

From @FROGGS

std​: say # that is what rakudo should do
std ee1ef48​: OUTPUT«===SORRY!===␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/l5n6Qr0hDp line 1​:␤------> say⏏ # that is what rakudo should do␤Check failed␤FAIL…»

m​: say # but it does not, which is a bug
rakudo-moar cb1d0e​: OUTPUT«␤»

@p6rt
Copy link
Author

p6rt commented Aug 29, 2014

From @coke

On Wed Aug 27 12​:59​:12 2014, FROGGS.de wrote​:

std​: say # that is what rakudo should do
std ee1ef48​: OUTPUT«===SORRY!===␤Unsupported use of bare 'say'; in
Perl 6 please use .say if you meant $_, or use an explicit invocant or
argument at /tmp/l5n6Qr0hDp line 1​:␤------> say⏏ # that is what rakudo
should do␤Check failed␤FAIL…»

m​: say # but it does not, which is a bug
rakudo-moar cb1d0e​: OUTPUT«␤»

rakudo now errors on both say AND say() instead of neither, but should only error on the former.

A test was just added to S32-exceptions/misc.t in fd376fc, but there are older tests (that need review) in S16-io/bare-say.t

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Sep 2, 2014

From @coke

On Fri Aug 29 06​:36​:12 2014, coke wrote​:

On Wed Aug 27 12​:59​:12 2014, FROGGS.de wrote​:

std​: say # that is what rakudo should do
std ee1ef48​: OUTPUT«===SORRY!===␤Unsupported use of bare 'say'; in
Perl 6 please use .say if you meant $_, or use an explicit invocant
or
argument at /tmp/l5n6Qr0hDp line 1​:␤------> say⏏ # that is what
rakudo
should do␤Check failed␤FAIL…»

m​: say # but it does not, which is a bug
rakudo-moar cb1d0e​: OUTPUT«␤»

rakudo now errors on both say AND say() instead of neither, but should
only error on the former.

A test was just added to S32-exceptions/misc.t in fd376fc, but there
are older tests (that need review) in S16-io/bare-say.t

Followup commits have this being caught at compile time, and tests were verified at the same time.

Closing ticket.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Sep 2, 2014

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

@p6rt p6rt closed this as completed Sep 2, 2014
@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