Skip to content

Commit

Permalink
RT #117583: guard against NULL container spec
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Apr 13, 2013
1 parent f0aa5a6 commit 070f3a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Perl6/Metamodel/BOOTSTRAP.pm
Expand Up @@ -445,15 +445,15 @@ BEGIN {
nqp::die("Cannot use 'is rw' on an optional parameter");
}
my $cd := nqp::getattr($dcself, Parameter, '$!container_descriptor');
if $cd { $cd.set_rw(1) }
if nqp::defined($cd) { $cd.set_rw(1) }
nqp::bindattr_i($dcself, Parameter, '$!flags', $flags + $SIG_ELEM_IS_RW);
$dcself
nqp::p6bool(nqp::defined($dcself));
}));
Parameter.HOW.add_method(Parameter, 'set_copy', static(sub ($self) {
my $SIG_ELEM_IS_COPY := 512;
my $dcself := nqp::decont($self);
my $cd := nqp::getattr($dcself, Parameter, '$!container_descriptor');
if $cd { $cd.set_rw(1) }
if nqp::defined($cd) { $cd.set_rw(1) }
nqp::bindattr_i($dcself, Parameter, '$!flags',
nqp::getattr_i($dcself, Parameter, '$!flags') + $SIG_ELEM_IS_COPY);
$dcself
Expand Down

0 comments on commit 070f3a4

Please sign in to comment.