Re: say Cool-concat-junction question

2018-12-24 Thread yary
Dumped this to https://github.com/rakudo/rakudo/issues/2568 -y

Re: say Cool-concat-junction question

2018-12-23 Thread Brad Gilbert
I am sure about that &infix:<~>.cando(\(3,('a'|'b'))».signature.say # ((*@args --> Str:D)) &infix:<~>.cando(\('x',('a'|'b')))».signature.say # ((Str:D $a, Junction:D $b) (*@args --> Str:D)) Since there is a Junction candidate (or rather three), there is probably a reason for it. Also if you turn

Re: say Cool-concat-junction question

2018-12-23 Thread yary
Thanks for this explanation El dom., 23 dic. 2018 a las 7:39, Brad Gilbert () escribió: > turns out there is a candidate for > > Str:D, Junction:D > > but not for > > Any:D, Junction:D ... An improvement would be to change the "Str:D, Junction:D" candidate on concatenation to the coercion "Str

Re: say Cool-concat-junction question

2018-12-23 Thread JJ Merelo
El dom., 23 dic. 2018 a las 7:39, Brad Gilbert () escribió: > I turns out there is a candidate for > > Str:D, Junction:D > > but not for > > Any:D, Junction:D > > so it is going through one of the other &infix:<~> candidates, > specifically it looks like it could be > > *@args > > Which doesn't ap

Re: say Cool-concat-junction question

2018-12-22 Thread Brad Gilbert
I turns out there is a candidate for Str:D, Junction:D but not for Any:D, Junction:D so it is going through one of the other &infix:<~> candidates, specifically it looks like it could be *@args Which doesn't apparently work with Junctions. So yes it is a bug. On Sat, Dec 22, 2018 at 9:05 PM

say Cool-concat-junction question

2018-12-22 Thread yary
What's going on here- is this error a mistake on my part, or a bug? $ perl6 -e "say 3 ~ ( 'a' | 'b' )" Type check failed for return value; expected Str:D but got Junction (any("3a", "3b")) in block at -e line 1 $ perl6 -e "say 'x' ~ ( 'a' | 'b' )" any(xa, xb) $ perl6 -v This is Rakudo Sta