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

Can't declare infix operators using 'my &infix:<sth>' syntax in Rakudo #2639

Closed
p6rt opened this issue Feb 4, 2012 · 6 comments
Closed

Can't declare infix operators using 'my &infix:<sth>' syntax in Rakudo #2639

p6rt opened this issue Feb 4, 2012 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Feb 4, 2012

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

Searchable as RT109800$

@p6rt
Copy link
Author

p6rt commented Feb 4, 2012

From @masak

<spine> perl6​: my &infix​:<c> = {$^a+$^b}; say 1 c 2;
<p6eval> niecza v14-11-gde9cc16​: OUTPUT«3␤»
<p6eval> ..rakudo a47a56​: OUTPUT«===SORRY!===␤Confused␤at /tmp/o_PnO5M2fr​:1␤»
<spine> reading moritz' comments on my solution to t1 for the p6cc
just made me remember how sad i was about this not working in rakudo
<spine> made me do unnecessary double function calls :)
<jnthn> Hm, should that work...
<jnthn> std​: my &infix​:<c> = {$^a+$^b}; say 1 c 2;
<p6eval> std 48335fc​: OUTPUT«ok 00​:01 116m␤»
<jnthn> Hm, appears so.
<spine> well, I don't know the spec, but it would enable you to use
curryed functions as infix ops
<masak> it should definitely work.
* masak submits rakudobug
<masak> nom​: sub infix​:<c> { $^a + $^b }; say 1 c 2
<p6eval> nom a47a56​: OUTPUT«3␤»

@p6rt
Copy link
Author

p6rt commented Jun 19, 2014

From @Mouq

On Sat Feb 04 04​:52​:39 2012, masak wrote​:

<spine> perl6​: my &infix​:<c> = {$^a+$^b}; say 1 c 2;
<p6eval> niecza v14-11-gde9cc16​: OUTPUT«3␤»
<p6eval> ..rakudo a47a56​: OUTPUT«===SORRY!===␤Confused␤at
/tmp/o_PnO5M2fr​:1␤»
<spine> reading moritz' comments on my solution to t1 for the p6cc
just made me remember how sad i was about this not working in rakudo
<spine> made me do unnecessary double function calls :)
<jnthn> Hm, should that work...
<jnthn> std​: my &infix​:<c> = {$^a+$^b}; say 1 c 2;
<p6eval> std 48335fc​: OUTPUT«ok 00​:01 116m␤»
<jnthn> Hm, appears so.
<spine> well, I don't know the spec, but it would enable you to use
curryed functions as infix ops
<masak> it should definitely work.
* masak submits rakudobug
<masak> nom​: sub infix​:<c> { $^a + $^b }; say 1 c 2
<p6eval> nom a47a56​: OUTPUT«3␤»

01​:19 < Mouq> r​: my &infix​:<c> = {$^a+$^b}; say 1 c 2;
01​:19 <+camelia> rakudo-jvm bcd186​: OUTPUT«(timeout)»
01​:19 <+camelia> ..rakudo-{parrot,moar} bcd186​: OUTPUT«3␤»

Marking as testneeded, since there are similar tests, but apparently none for this specific bug.

@p6rt
Copy link
Author

p6rt commented Jun 19, 2014

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 11, 2014

From @peschwa

Am Mi 18. Jun 2014, 22​:15​:22, Mouq schrieb​:

On Sat Feb 04 04​:52​:39 2012, masak wrote​:

<spine> perl6​: my &infix​:<c> = {$^a+$^b}; say 1 c 2;
<p6eval> niecza v14-11-gde9cc16​: OUTPUT«3␤»
<p6eval> ..rakudo a47a56​: OUTPUT«===SORRY!===␤Confused␤at
/tmp/o_PnO5M2fr​:1␤»
<spine> reading moritz' comments on my solution to t1 for the p6cc
just made me remember how sad i was about this not working in rakudo
<spine> made me do unnecessary double function calls :)
<jnthn> Hm, should that work...
<jnthn> std​: my &infix​:<c> = {$^a+$^b}; say 1 c 2;
<p6eval> std 48335fc​: OUTPUT«ok 00​:01 116m␤»
<jnthn> Hm, appears so.
<spine> well, I don't know the spec, but it would enable you to use
curryed functions as infix ops
<masak> it should definitely work.
* masak submits rakudobug
<masak> nom​: sub infix​:<c> { $^a + $^b }; say 1 c 2
<p6eval> nom a47a56​: OUTPUT«3␤»

01​:19 < Mouq> r​: my &infix​:<c> = {$^a+$^b}; say 1 c 2;
01​:19 <+camelia> rakudo-jvm bcd186​: OUTPUT«(timeout)»
01​:19 <+camelia> ..rakudo-{parrot,moar} bcd186​: OUTPUT«3␤»

Marking as testneeded, since there are similar tests, but apparently
none for this specific bug.

A test for this has been added in roast commit a9171d7c.

@p6rt
Copy link
Author

p6rt commented Sep 24, 2014

From @usev6

The test in S06-operator-overloading/sub.t passes and the test file is in t/spectest.data.

If the ticket should not be set to resolved (if there is something else to do), please comment.

@p6rt p6rt closed this as completed Sep 24, 2014
@p6rt
Copy link
Author

p6rt commented Sep 24, 2014

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

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