# New Ticket Created by "shinobi.cl ."
# Please include the string: [perl #108796]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=108796 >
Hello:
When trying to make an operator that worked on some role only, i have found
that:
*rakudo: role myrole {}; my sub infix:<¬>(myrole $s1, myrole $s2) { say
"$s1 ¬ $s2" }; my Str $s1 = "s1" does myrole; my Str $s2 = "s2" does
myrole; say $s1 ¬ $s2;*
Returns this error on rakudo:
«===SORRY!===CHECK FAILED:Calling 'infix:<\xAC>' will never work with
argument types (Str, Str) (line 1) Expected: :(myrole $s1, myrole $s2)»
As for niecza-v13-327-g5a9c36f the above code returned the expected answer.
Following the advice of someone at #perl6, i've removed the "Str" part of
$s1 and $s2, and it worked as expected.
*rakudo: role myrole {}; my sub infix:<¬>(myrole $s1, myrole $s2) { say
"$s1 ¬ $s2" }; my $s1 = "s1" does myrole; my $s2 = "s2" does myrole; say
$s1 ¬ $s2;*
*11:59 p6eval rakudo 2e26f3: OUTPUT«s1 ¬ s2Bool::True»*
--
-shinobi.cl-