Skip to content

Commit

Permalink
Ensure correct semantics for [Nil]
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Sep 28, 2018
1 parent e430813 commit 88e6de2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/core/array_operators.pm6
Expand Up @@ -30,13 +30,14 @@ multi sub circumfix:<[ ]>(Mu \x) { # really only for [$foo]
nqp::p6bindattrinvres(
nqp::create(Array),List,'$!reified',
nqp::stmts(
(my \scalar := nqp::create(Scalar)),
nqp::bindattr(
scalar, Scalar, '$!descriptor',
BEGIN nqp::getcurhllsym('default_cont_spec')
nqp::bindpos(
(my \reified := nqp::create(IterationBuffer)),
0,
nqp::p6scalarwithvalue(
(BEGIN nqp::getcurhllsym('default_cont_spec')),
nqp::decont(x)
)
),
nqp::bindattr(scalar,Scalar,'$!value',nqp::decont(x)),
nqp::bindpos((my \reified := nqp::create(IterationBuffer)),0,scalar),
reified
)
)
Expand Down

0 comments on commit 88e6de2

Please sign in to comment.