Skip to content
Permalink
Browse files

Make 'my @A["a"]' a bit more awesome

Should probably also be checked at compile / optimizer time.
  • Loading branch information...
lizmat committed Dec 18, 2018
1 parent 55d08c8 commit 24c8e172f517091a751a15a449e6636e27090172
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/core/Rakudo/Internals.pm6
@@ -426,12 +426,15 @@ my class Rakudo::Internals {
nqp::istype((my $dim := nqp::atpos($spec,$i)),Whatever),
X::NYI.new(feature => 'Jagged array shapes').throw,
nqp::if(
nqp::isbig_I(nqp::decont($dim := nqp::decont($dim.Int)))
|| nqp::isle_i($dim,0),
X::IllegalDimensionInShape.new(:$dim).throw,
nqp::stmts(
nqp::push($types,type),
nqp::push_i($dims,$dim)
nqp::istype(($dim := nqp::decont($dim.Int)),Failure),
$dim.throw,
nqp::if(
nqp::isbig_I($dim) || nqp::isle_i($dim,0),
X::IllegalDimensionInShape.new(:$dim).throw,
nqp::stmts(
nqp::push($types,type),
nqp::push_i($dims,$dim)
)
)
)
)

0 comments on commit 24c8e17

Please sign in to comment.
You can’t perform that action at this time.