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

operators as macros sink their arguments #6040

Open
p6rt opened this issue Feb 1, 2017 · 2 comments
Open

operators as macros sink their arguments #6040

p6rt opened this issue Feb 1, 2017 · 2 comments

Comments

@p6rt
Copy link

p6rt commented Feb 1, 2017

Migrated from rt.perl.org#130685 (status was 'stalled')

Searchable as RT130685$

@p6rt
Copy link
Author

p6rt commented Feb 1, 2017

From @BenGoldberg1

When I type the following in the #perl6 irc channel​:

m​: use experimental :macros; macro infix​:<plus>($a, $b) { return quasi { {{{$a}}} + {{{$b}}} } }; say 2 plus 3;

camelia reponds​:

rakudo-moar d69f37​: OUTPUT«WARNINGS for <tmp>​:␤Useless use of constant integer 2 in sink context (line 1)␤Useless use of constant integer 3 in sink context (line 1)␤5␤»

The sum (5) does appear at the end there... but the “Useless use...” warnings are obviously wrong.

@p6rt
Copy link
Author

p6rt commented Feb 1, 2017

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

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