Skip to content

Commit

Permalink
Couple of small fixes to signature generation, to unbreak auto-thread…
Browse files Browse the repository at this point in the history
…ing on method arguments.
  • Loading branch information
jnthn committed Oct 8, 2009
1 parent ea0db83 commit d65bec9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/parser/signature.pm
Expand Up @@ -45,6 +45,7 @@ method add_invocant() {
$param<var_name> := "self";
$param<invocant> := 1;
$param<multi_invocant> := 1;
$param<names> := list();
@entries.unshift($param);
}
}
Expand Down Expand Up @@ -127,13 +128,14 @@ method ast($high_level?) {

# Fix up nominal type.
my $sigil := substr($_<var_name>, 0, 1);
if $_<slurpy> {
$_<nom_type> := PAST::Var.new( :name('Object'), :scope('package') );
if $_<slurpy> || $_<invocant> {
$_<nom_type> := PAST::Var.new( :name('Object'), :namespace(list()), :scope('package') );
}
elsif $sigil eq "$" {
if !$_<nom_type> {
$_<nom_type> := PAST::Var.new(
:name(self.get_default_parameter_type()),
:namespace(list()),
:scope('package')
);
}
Expand Down

0 comments on commit d65bec9

Please sign in to comment.