Skip to content

Commit

Permalink
Throw one more typed exception
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Feb 8, 2012
1 parent 0711f9f commit 6ed624d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Perl6/Actions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,10 @@ class Perl6::Actions is HLL::Actions {

# Ensure it's actually a dispatcher.
unless $proto.is_dispatcher {
$/.CURSOR.panic("Cannot declare a multi when an only is in scope");
$*W.throw($/, ['X', 'Redeclaration'],
what => 'routine',
symbol => ~$<deflongname>[0].ast,
);
}

# Install the candidate.
Expand Down

0 comments on commit 6ed624d

Please sign in to comment.