# New Ticket Created by Jonathan Stowe # Please include the string: [perl #127393] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=127393 >
perl6 -e 'subset JJ where *.can("foo"); -> JJ:D $a { } ' ===SORRY!=== Method 'iterator' must be implemented by Iterable because it is required by a role This does not happen without the Type modifier in the signature, i.e. subset JJ where *.can("foo"); -> JJ $a { } But a modified subset that does not call a method is fine: subset JJ where { True }; -> JJ:D $a { } But it appears that in fact that it isn't 'can' that is the culprit but using *any* method on the item: perl6 -e 'subset JJ where *.foo; -> JJ:D $a { } ' ===SORRY!=== Method 'iterator' must be implemented by Iterable because it is required by a role