# Pastebin SBm0s6KH class Content {} class Page {} subset NavItem of Pair where *.value ~~ Content | Page; class Nav { has NavItem() @.items; } my $n = Nav.new: items => [Page1 => Page.new, Page2 => Page.new]; #Impossible coercion from 'Pair' into 'NavItem': method Pair returned an instance of Pair in block at xxx.raku line 10