On Sat, Sep 17, 2016 at 4:21 AM, MT <mt195...@gmail.com> wrote:

> Btw the following has the same problem;
> > my Hash $h = {a=>1,b=>2}
> {a => 1, b => 2}
> > $h<a>:exists
> True
> > subset mh of Str where $h{$_}:exists
> (mh)
> > my mh $x = 'b'
> Type check failed in assignment to $x; expected mh but got Str ("b")
>   in block <unit> at <unknown file> line 1

That's a REPL bug, the all on one line it works.

> my Hash $h = {a=>1,b=>2};subset mh of Str where $h{$_}:exists;my mh $x =

That's worth opening a bug about.

> should I open a ticket for the Map/subset thing?

I'm not so sure now. With "exists" instead of "(elem)" there's no such
problem, and after reading Elizabeth's explanation "(elem)"'s behavior
makes more sense.


Reply via email to