Skip to content
Permalink
Browse files

Ensure correct semantics for [Nil]

  • Loading branch information...
lizmat committed Sep 28, 2018
1 parent e430813 commit 88e6de226e7da55459326022e30d0a42d45ba8e2
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/core/array_operators.pm6
@@ -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
)
)

0 comments on commit 88e6de2

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