Skip to content

Commit

Permalink
Enable num->str coercion in native.repeated/unique
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Feb 20, 2022
1 parent ad85660 commit 979cc60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/core.c/native_array.pm6
Expand Up @@ -98,7 +98,7 @@ my class array does Iterable does Positional {

role strarray[::T] does Positional[T] is array_type(T) {
#- start of generated part of strarray role -----------------------------------
#- Generated on 2022-02-19T17:20:15+01:00 by ./tools/build/makeNATIVE_ARRAY.raku
#- Generated on 2022-02-20T13:32:29+01:00 by ./tools/build/makeNATIVE_ARRAY.raku
#- PLEASE DON'T CHANGE ANYTHING BELOW THIS LINE

multi method grep(strarray:D: Str:D $needle, :$k, :$kv, :$p, :$v --> Seq:D) {
Expand Down Expand Up @@ -717,7 +717,7 @@ my class array does Iterable does Positional {

role intarray[::T] does Positional[T] is array_type(T) {
#- start of generated part of intarray role -----------------------------------
#- Generated on 2022-02-19T17:20:15+01:00 by ./tools/build/makeNATIVE_ARRAY.raku
#- Generated on 2022-02-20T13:32:29+01:00 by ./tools/build/makeNATIVE_ARRAY.raku
#- PLEASE DON'T CHANGE ANYTHING BELOW THIS LINE

multi method grep(intarray:D: Int:D $needle, :$k, :$kv, :$p, :$v --> Seq:D) {
Expand Down Expand Up @@ -1378,7 +1378,7 @@ my class array does Iterable does Positional {

role uintarray[::T] does Positional[T] is array_type(T) {
#- start of generated part of uintarray role -----------------------------------
#- Generated on 2022-02-19T17:20:15+01:00 by ./tools/build/makeNATIVE_ARRAY.raku
#- Generated on 2022-02-20T13:32:29+01:00 by ./tools/build/makeNATIVE_ARRAY.raku
#- PLEASE DON'T CHANGE ANYTHING BELOW THIS LINE

multi method grep(uintarray:D: Int:D $needle, :$k, :$kv, :$p, :$v --> Seq:D) {
Expand Down Expand Up @@ -2039,7 +2039,7 @@ my class array does Iterable does Positional {

role numarray[::T] does Positional[T] is array_type(T) {
#- start of generated part of numarray role -----------------------------------
#- Generated on 2022-02-19T17:20:15+01:00 by ./tools/build/makeNATIVE_ARRAY.raku
#- Generated on 2022-02-20T13:32:29+01:00 by ./tools/build/makeNATIVE_ARRAY.raku
#- PLEASE DON'T CHANGE ANYTHING BELOW THIS LINE

multi method grep(numarray:D: Num:D $needle, :$k, :$kv, :$p, :$v --> Seq:D) {
Expand Down Expand Up @@ -2121,7 +2121,7 @@ my class array does Iterable does Positional {
nqp::unless(
nqp::existskey(
$seen,
(my str $key = (
(my str $key = nqp::coerce_ns(
my num $value = nqp::atpos_n(self,$i)
))
),
Expand All @@ -2146,7 +2146,7 @@ my class array does Iterable does Positional {
nqp::if(
nqp::existskey(
$seen,
(my str $key = (
(my str $key = nqp::coerce_ns(
my num $value = nqp::atpos_n(self,$i)
))
),
Expand Down
2 changes: 1 addition & 1 deletion tools/build/makeNATIVE_ARRAY.raku
Expand Up @@ -30,7 +30,7 @@ my %type_mapper = (
:value<int>,
:Value<Int>,
).Map,
num => ( :coerce(''),
num => ( :coerce('nqp::coerce_ns'),
:iseq_postfix<n>,
:postfix<n>,
:list_postfix<n>,
Expand Down

0 comments on commit 979cc60

Please sign in to comment.