Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't bother type checking, the guts will do it
  • Loading branch information
lizmat committed Jul 10, 2015
1 parent 406aae9 commit 5f7ce71
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/core/native_array.pm
Expand Up @@ -130,18 +130,6 @@ class array is Iterable is repr('VMArray') {
:got($s),
:range("0..^{$elems - $o}"),
).fail if $s < 0;

my @v := @values.eager;
if @v {
# Typechecking on setting values in a native int array, is fraught with
# gotcha's. Since we're not doing any overflow/underflow checks with
# natives anyway, we just going to typecheck with Int
X::TypeCheck::Splice.new(
:action<splice>,
:got($_.WHAT),
:expected(T),
).fail unless nqp::istype($_,Int) for @v;
}

if $SINK {
my @splicees := nqp::create(self);
Expand Down Expand Up @@ -348,18 +336,6 @@ class array is Iterable is repr('VMArray') {
:got($s),
:range("0..^{$elems - $o}"),
).fail if $s < 0;

my @v := @values.eager;
if @v {
# Typechecking on setting values in a native num array, is fraught with
# gotcha's. Since we're not doing any overflow/underflow checks with
# natives anyway, we just going to typecheck with Num
X::TypeCheck::Splice.new(
:action<splice>,
:got($_.WHAT),
:expected(T),
).fail unless nqp::istype($_,Num) for @v;
}

if $SINK {
my @splicees := nqp::create(self);
Expand Down

0 comments on commit 5f7ce71

Please sign in to comment.