develooper Front page | perl.perl6.users | Postings from September 2018

A problem with native CArrays

Thread Next
From:
Fernando Santagata
Date:
September 30, 2018 09:27
Subject:
A problem with native CArrays
Message ID:
CAJ+jyGiM5mB9TeH-rjqRiP1zs4RujW6O6eR6_t4WkRYo1KkMuw@mail.gmail.com
Hi,

I was hunting for a bug in my code, this one:

my @a := CArray[int32].new: 6,3;
say [+] @a; # it should be "say [+] @a.list;"

That statement prints "9", while changing the '+' with a '*' it generates
an error, as it should:

Cannot resolve caller Numeric(NativeCall::Types::CArray[int32]: ); none of
these signatures match:
    (Mu:U \v: *%_)

Is this a bug, an inconsistency, or a necessary evil?

-- 
Fernando Santagata

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About