Skip to content

Commit

Permalink
Don't allow binding into a List, period
Browse files Browse the repository at this point in the history
As per jnthn's comment in the discussion on GH #1261.  Spectests clean.
  • Loading branch information
lizmat committed Jan 9, 2018
1 parent e820f30 commit eed54ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/List.pm
Original file line number Diff line number Diff line change
Expand Up @@ -574,10 +574,8 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP
!! X::Assignment::RO.new(value => self).throw
}

method BIND-POS(List:D: Int:D \pos, \what) is raw {
nqp::iscont(self.AT-POS(pos))
?? nqp::bindpos($!reified,nqp::unbox_i(pos),what)
!! X::Bind.new.throw
method BIND-POS(List:D: Int:D \pos, \what) {
X::Bind.new.throw
}

multi method EXISTS-POS(List:D: int $pos) {
Expand Down

0 comments on commit eed54ca

Please sign in to comment.