Here I see this:

$ perl6 --version
This is Rakudo version 2016.08.1 built on MoarVM version 2016.08
implementing Perl 6.c.
$ perl6
To exit type 'exit' or '^D'
> my Map $p .= new(<d f g h aa bb ff>.kv.reverse);subset pv of Str where $_
(elem) $p;my pv $x = 'aa';say $x;
aa

But if I feed three separate statements to the REPL, I receive the same
error you have, so I think there's indeed a bug somewhere.

On Fri, Sep 16, 2016 at 3:48 PM, mt1957 <mt1...@gmail.com> wrote:

> Hi Fernando,
>
> I had this problem from a module I am writing and there it went wrong with
> this error. So, not only REPL has problems. Perhaps I should write a bug
> ticket.
>
> Marcel,
>
> P.s. Rakudo version 2016.08.1-117-g1d8f99a built on MoarVM version
> 2016.08-32-ge52414d
> implementing Perl 6.c.
>
>
> It works fine if the three statements are on the same line and if the
> program is being read from a file, so I guess it's bug of the REPL.
>
> On Fri, Sep 16, 2016 at 1:49 PM, mt1957 <mt1...@gmail.com> wrote:
>
>> Hi everyone,
>>
>> I am trying to create a subset but get errors when used. Surely I do
>> something wrong here or is it a bug?
>>
>> In REPL
>>
>> > my Map $p .= new(<d f g h aa bb ff>.kv.reverse);
>> Map.new((:aa(4),:bb(5),:d(0),:f(1),:ff(6),:g(2),:h(3)))
>> > subset pv of Str where $_ (elem) $p;
>> (pv)
>> > my pv $x = 'aa';
>> Type check failed in assignment to $x; expected pv but got Str ("aa")
>>   in block <unit> at <unknown file> line 3
>>
>>
>> Greetings,
>>
>> Marce
>>
>>
>
>
> --
> Fernando Santagata
>
>
>


-- 
Fernando Santagata

Reply via email to