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

KEEP + for loop = useless useless use warning #1319

Closed
zoffixznet opened this issue Dec 18, 2017 · 0 comments
Closed

KEEP + for loop = useless useless use warning #1319

zoffixznet opened this issue Dec 18, 2017 · 0 comments
Labels
useless warnings Spurious “Useless use of …” warning

Comments

@zoffixznet
Copy link
Contributor

The value has a potentially useful impact and IMO the warning should not be issued:

$ perl6 -e 'm: for ^5 { KEEP say "and"; 42 }'
WARNINGS for -e:
Useless use of constant integer 42 in sink context (line 1)
and
and
and
and
and

$ perl6 -e 'm: for ^5 { KEEP say "and"; Any }'
WARNINGS for -e:
Useless use of constant value Any in sink context (line 1)

$ perl6 -v
This is Rakudo version 2017.11-8-g7939014 built on MoarVM version 2017.11
implementing Perl 6.c.
@zoffixznet zoffixznet added the useless warnings Spurious “Useless use of …” warning label Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
useless warnings Spurious “Useless use of …” warning
Projects
None yet
Development

No branches or pull requests

1 participant