Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge two at_pos candidates
  • Loading branch information
lizmat committed Jan 15, 2015
1 parent fdada00 commit 4af3cab
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/Any.pm
Expand Up @@ -435,9 +435,6 @@ my class Any { # declared in BOOTSTRAP
multi method at_pos(Any:U: Any:D \pos) is rw {
self.at_pos(nqp::unbox_i(pos.Int));
}
multi method at_pos(Any:U: Any:U \pos) is rw {
die "Cannot use '{pos.^name}' as an index";
}

multi method at_pos(Any:D: int \pos) {
fail X::OutOfRange.new(:what<Index>, :got(pos), :range(0..0))
Expand All @@ -457,7 +454,8 @@ my class Any { # declared in BOOTSTRAP
multi method at_pos(Any:D: Any:D \pos) {
self.at_pos(nqp::unbox_i(pos.Int));
}
multi method at_pos(Any:D: Any:U \pos) is rw {

multi method at_pos(Any: Any:U \pos) is rw {
die "Cannot use '{pos.^name}' as an index";
}

Expand Down

0 comments on commit 4af3cab

Please sign in to comment.