On Wed Jan 27 12:12:17 2016, jns...@gellyfish.co.uk wrote: > 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
We were mishandling the Subtype:D case in general, and sometimes it just didn't go quite so badly as other times. I've hopefully fixed that now, and added some tests in S12-subset/subtypes.t.