# New Ticket Created by Timothy Bollman # Please include the string: [perl #130362] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=130362 >
The is-deeply operator does not appear to pick up custom infix eqv variants. I can see on line 567 of rakudo/lib/Test.pm6 that _is_deeply is using infix:<eqv>, but it doesn't pick up the custom variant. I attempted exporting the operator and moving the use Test below the multi declaration, but it didn't make any difference (I didn't expect it to, but didn't hurt to try). use v6; use Test; class Custom-Equality { has $.a; has $.b; } # Define a custom equivalence operator that equates the opposite properties # instead of the same properties. multi infix:<eqv>(Custom-Equality $l, Custom-Equality $r) { return !$r.defined unless $l.defined; return $r.defined && $l.a eqv $r.b && $l.b eqv $r.a; } my Custom-Equality $x .= new(:a<cat>, :b<dog>); my Custom-Equality $y .= new(:a<dog>, :b<cat>); ok($x eqv $y, 'x is equivalent to y'); # Passes is-deeply($x, $y, 'x is deeply y'); # Fails