Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
nice error if $?CLASS isn't there around signatures
  • Loading branch information
timo committed Apr 25, 2014
1 parent 1ae0b29 commit 440739c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -3674,7 +3674,16 @@ class Perl6::Actions is HLL::Actions does STDActions {
}
elsif $twigil eq '!' {
%*PARAM_INFO<bind_attr> := 1;
%*PARAM_INFO<attr_package> := $*W.find_symbol(['$?CLASS']);
my int $succ := 1;
try {
%*PARAM_INFO<attr_package> := $*W.find_symbol(['$?CLASS']);
CATCH {
$succ := 0;
}
}
unless $succ {
$/.CURSOR.panic('cannot use a $! parameter in a signature where no $?CLASS is available');
}
}
elsif $twigil eq '.' {
%*PARAM_INFO<bind_accessor> := 1;
Expand Down

0 comments on commit 440739c

Please sign in to comment.